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:
{{MyData||MyTemplate}}
enjoy,
-e
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/2adc0c19-dd66-4928-a89b-b1002c1b0cebo%40googlegroups.com.