currentTiddler in field

This is not working. I also tried adding more brackets since the value in the quote-source field is a multi-word title. Thanks in advance for any help.

quote-source[[[<currentTiddler>]]]

<$list filter="[quote-source[<currentTiddler>]sort[title]]">
   <h2><$link><$transclude field="title" mode="block"/></$link></h2>
   <$transclude field="text" mode="block"/>
   </$list>

It is not obvious what your desired result is.

It is better to ask for what you want than to only show us how it failed :nerd_face:

Brackets surrounding filter operands are not just “delimiters”… they indicate how to process the operand:

  • use square brackets around literal text values (e.g., quote-source[somevalue])
  • use angle brackets around variable references (e.g., quote-source<somevariable>)
  • use curly brackets around tiddler title/field references (e.g., quote-source{!!somefield})

Thus, for your $list widget filter, you should write:

<$list filter="[quote-source<currentTiddler>sort[title]]">

let me know how it goes…

enjoy,
-e

I propose the following code:

<$list filter="[quote-source<currentTiddler>sort[title]]">
   <h2><$link to=<<curentTiddler>>/></h2>
   <$transclude mode="block"/>
</$list>

You don’t have to ask for a block mode for a title, don’t you? That,s a single line and it’s supposed to be plain text. Then I use the default valie por the link widget and the transclude widget, which is the current tiddler, that is the title of the current tiddler.

Question: what’s that quote-sourcefilter operator? I can’t find it.

@TW_Tones and @EricShulman: thank you so much for your answers, I still have a problem though

@TW_Tones:

The background to this is: At present I can get all the quote tiddlers pertaining to any particular article tiddler to automatically show up in the respective article tiddler as long as each quote tiddler is tagged with the title of the article tiddler.

Three years ago @EricShulman showed me how to do this in this post: https://groups.google.com/g/tiddlywiki/c/cnLMro2vJDc/m/2SP_tqt6CgAJ
(Instead of article tiddlers it was book tiddlers.)

But this bloats my tags with the title of every article or book I ever took a quote from.

So I was thinking … instead of tagging the quote tiddler with the title of the article tiddler it came from, why not use a field, give the quote tiddler a field named “quote-source” and put the title of the article in the field.

So instead of using something like this:

<$list filter="[<currentTiddler>prefix[ARTICLE -]]">
   <$list filter="[tag<currentTiddler>!sort[title]]">
   <h2><$link><$transclude field="title" mode="block"/></$link></h2>

   <$transclude field="text" mode="block"/>
   </$list>
</$list>

I changed the second line to what @EricShulman just suggested:

<$list filter="[<currentTiddler>prefix[ARTICLE -]]">
   <$list filter="[quote-source<currentTiddler>sort[title]]">
   <h2><$link><$transclude field="title" mode="block"/></$link></h2>

   <$transclude field="text" mode="block"/>
   </$list>
</$list>

However it is still not working. The first code displays output but when I change to the second code nothing displays. I wonder if it has anything to do with there being double brackets around the multi-worded title in the field.

@jypre

This is all I knew how to use before:

<h2><$link><$transclude field="title" mode="block"/></$link></h2>
   <$transclude field="text" mode="block"/>

Is this the new standard way of writing it?

<h2><$link to=<<curentTiddler>>/></h2>
   <$transclude mode="block"/>

They both appear to give the same outcome.

1 Like

This is not a solution to the problem of working with spacey tiddler titles in fields (which I’ve also been frustrated with, and found only partial solutions for). Instead, it’s a suggestion that you can take or leave (and that others, browsing this thread, may take or leave), given my experience with a similar TiddlyWiki task.

Like you, I have been developing a bibliographic solution that houses excerpts.

A year ago, I become a convert to the bibtex / refnotes system (developed by @Mohammad) for my bibliographic wiki. Here’s a public version of my wiki, which includes excerpts. It’s not perfect, but it’s powerful. (My wiki currently does use the tag field for sources. That’s not essential, but I like the ease of hitting the existing “new here” button in the toolbar for opening up an excerpt tiddler, and the tags themselves are compact, because tiddler titles are compact, as noted below.)

One nice thing about the bibtex system is that it defaults to tiddler titles that don’t have spaces — the standard is something like addams1910charity (authorYEARfirstbigword) as the tiddler title. The bibtex-title field then holds the standard bibliographic title. I also generate a caption field for each tiddler, and I’ve set up cascade conditions so that the caption field is displayed in place of the title for most purposes (and one great thing about that is that the caption field can then use styles like italics and such, for better bibliographic formatting).

Upshot: you can easily use tiddler titles in a field (such as my equivalent of your quote-source field), and those tiddler titles won’t have spaces. (This also means you can put multiple titles in a field, which is useful if, say, you want a field such as “refers-to” wherein to point to upstream sources alluded to within a quote.)

Another benefit is that google scholar offers decent bibtex json arrays for most sources, including unique tiddler titles with this author2023titleword format already standardized. In google scholar, choose the “cite” link, then BibTeX at bottom:

the bibtex json looks like this:

@article{addams1910charity,
  title={Charity and social justice},
  author={Addams, Jane},
  journal={The North American Review},
  volume={192},
  number={656},
  pages={68--81},
  year={1910},
  publisher={JSTOR}
}

Paste that into your wiki (in the bibtex import interface), and key fields get populated according to the bibtex- field-naming standard.

Whether to refactor a solution is always a difficult decision, dependent on your purposes. For what it’s worth, my view is that bibliographic tools are much more powerful when we start with solutions developed by smart and experienced community members like Mohammad.

AND, if you decide to refactor around the bibtex / refnotes standard, the pain of the process is greatly reduced with the Commander plugin (also from @Mohammad) — which lets you grab every tiddler that fits a certain filter condition (such as those whose titles start with ARTICLE -) and add a bibtex-entry-type field with contents article, etc.

If you find this advice convincing, but intimidating, I’d be happy to help walk you through the steps you’d need to take, and to share some of the view templates and other custom mods that I’ve developed around the core tools Mohammad provides.

Coincidently recently, I enhanced a tool I had built, that allowed a related tidder to be selected (via search) and set it in a tiddlers field. This was called related tiddler, and you could only set one related tiddler.

  • I had long thought this limiting, and rewrote it recently to store multiple tiddlers in the same field. So you can now have multiple-related tiddlers.

This tool could be used for the relationship between your artical and quote tiddlers. One nice feature is you can review the list of related tiddlers in the same dropdown you used to assign them, and also see where the current tiddler is also mentioned as a related tiddler.

  • Given a little time I could share a video on how it is used, the tool is still only a proof of concept and as is common for me in tiddlywiki is see other posibilities so I don’t finalise the design. I like continuose improvment.
  • It is part of a larger collection of solutions I am developing for picking tiddlers.

I plan to do a quick video today and then you can tell me if it will solve, or enhance your current issues.

@Sapphireslinger I already told you, really. The $transclude widget have a default value for $tiddler, which is <<currentTiddler>> and so I use this fact to trim the code. I also made the point you would have no use to be in block mode for transcluding a tiddler title. If I wanted to specify the value and not have them as default value I would have coded.

<h2><$link to=<<curentTiddler>>/></h2>
   <$transclude $tiddler=<<currentTiddler>> mode="block"/>

Not that by specifying $tiddler I elected the new modern functioning of the widget, which was not the case before. But I could select it by using another $ property for this widget. Especially, If I use $mode instead of simply mode.

All in all the shortest modern way is:

<h2><$link/></h2>
   <$transclude $mode="block"/>