On Wednesday, September 23, 2020 at 1:59:09 AM UTC-7, Jean-Pierre Rivière wrote:
... how one could set a current data tiddler within a regular tiddler/macro tiddler!
There are several widgets that can be used to set the value of <<currentTiddler>>. One of the most frequently used is the $list widget.
For example, suppose you have several data tiddlers, each tagged with "MyData" and containing an index named "purpose" and another index named "priority"
Then, to list the purpose and priority for each data tiddler, you could write something like this:
<$list filter="[tag[MyData]]">
<$link /> was created on <$view field="modified"/> for {{##purpose}} with a priority of {{##priority}}<br>
</$list>
or, you could create a template tiddler (e.g., "MyTemplate") containing:
<$link /> was created on <$view field="modified"/> for {{##purpose}} with a priority of {{##priority}}
and then invoke it via transclusion like this:
<$list filter="[tag[MyData]]"> {{||MyTemplate}} </$list>
Another example...
suppose you have just one data tiddler named "MyData", and you want to show several index values from that tiddler. Then, you could use the $tiddler widget, like this:
<$tiddler tiddler="MyData">
<$link /> was created on <$view field="modified"/> for {{##purpose}} with a priority of {{##priority}}
</$tiddler>
or with the same template as defined above:
enjoy,
-e