Is there a variable for the "root" tiddler (e.g. to get to the very first tiddler regardless of the depth of transclusions?)?

Hello all!

I’m aware of the <..currentTiddler> tiddler to access the tiddler outside a filter run, but I’m curious if there is a way to access what I call herein the “root” tiddler; meaning the tiddler that is the very first parent tiddler holding potentially several levels deep of transclusions of other tiddlers, and that isn’t displayed as a child in another. For example:

Tiddler ϱ (“root” tiddler)
|_ Calls a list of Tiddlers 1 to #
                          |_ each Tiddler 1 to n displays via a Filter another list of Tiddlers a to z

If I’m not mistaken, in the Tiddlers a to z, the filter considers <currentTiddler> to be the Tiddler being currently iterated upon by the list filter, then <..currentTiddler> would be the Tiddler 1 to # from where the list is called.

Is there a global variable in TW, or any mechanism for that matter, that can go up the chain of transclusions all the way to the “root” tiddler?

Perhaps the “storyTiddler” variable is what you want.

see https://tiddlywiki.com/#storyTiddler%20Variable

-e

1 Like

It works for my use case, thank you!

<..currentTiddler> is actually a special variable for use in the :map filter operator.
In a normal filter [<currentTiddler>] returns the <<currentTiddler>> variable outside the filter.
However within the :map, <currentTiddler> refers to the title of the current filter result.

eg:

<$tiddler tiddler=foo>

* `<currentTiddler>`: {{{  [[bar]] :map[[result=]addsuffix<currentTiddler>] }}}
* `<..currentTiddler>`: {{{  [[bar]] :map[[result=]addsuffix<..currentTiddler>] }}}
</$tiddler>
  • <currentTiddler> : result=bar
  • <..currentTiddler>: result=foo
1 Like