When a content tiddler is displayed in a tabset, the name of that tiddler is stored in the <<currentTab>>
variable.
Thus, instead of using {{!!title}}
, you could write <<currentTab>>
, like this:
@@background-color:yellow;
Hello, my title is <<currentTab>>
@@
However… this would then not work if you ever want to display the content tiddler outside of a tab set (i.e., if you view it directly in the StoryRiver) because <<currentTab>>
is only defined within the tabset.
To work around this, you can write your content tiddler like this:
<$tiddler tiddler=<<currentTab>>>
@@background-color:yellow;
Hello, my title is {{!!title}}
@@
</$tiddler>
By adding <$tiddler tiddler=<<currentTab>>
at the start of the content, it sets the <<currentTiddler>>
value to match the <<currentTab>>
value, allowing the {{!!title}}
field transclusion to work as before, but when displayed in the StoryRiver, <<currentTab>>
is undefined, so the $tiddler
widget is effectively ignored.
(ref: this technique is described at the bottom of the https://tiddlywiki.com/#tabs%20Macro documentation)
-e