currentTiddler and tabbed internal table of contents

Hello everyone,

I’m currently using a tabbed internal table of contents, as documented here: https://tiddlywiki.com/#Example%20Table%20of%20Contents%3A%20Tabbed%20Internal.

I have group of tiddlers that call the same template. These are then placed within the tabbed internal framework. The template creates, modifies, and references a field within each tiddler that calls it.

This setup works fine when the calling tiddler is not within the tabbed internal framework. However, when I place the calling tiddler within the tabbed internal framework, the template adds the field to the tabbed internal table of contents instead of the calling tiddler. It seems that in this structure, the tiddler that provides the space for the tabbed internal table of contents is treated as the currentTiddler.

Is there any way to force the template to modify and reference the calling tiddler, rather than the tabbed internal tiddler? Any advice or guidance would be greatly appreciated. I have devised a work-around, but implementing it is proving awkward, and I’m wondering if there is a simpler approach.

Thank you in advance for your help!

Within the tabbed framework, the title of each tab is available in the <<currentTab>> variable, which is undefined when outside the tab framework.

Thus, to make your template work within tabs, you can add this one line to the start of the template:

<$tiddler tiddler=<<currentTab>>>

Then, all the field references within the template will refer to the correct tiddler.

enjoy,
-e

2 Likes

Wow. Fanntastic. I wish I had asked for help earlier. :grinning: