On Thursday, June 6, 2019 at 10:38:47 AM UTC-7, BJ wrote:
>
> the tabs macro uses the variable 'currentTab' so you could test for 
> currentTiddler being empty and if so use the currentTab:
> <$set name="currentTiddler" filter="[all[current]]" value=<
> <currentTiddler>> emptyValue=<<currentTab>>>
> <$text text={{!!month}}/>
> </$set>
>
>
There's another, much simpler way to do this, using the <$tiddler> widget.  
Just add the following in any tiddler that you want to show in a tabset:

<$tiddler tiddler=<<currentTab>>>
...
tiddler content goes here, e.g., <$text text={{!!month}}/>
...
</$tiddler>

When the tiddler is displayed directly, the <<currentTab>> variable is 
undefined, and the <<currentTiddler>> is unchanged (i.e., the $tiddler 
widget has no effect).  However, when the tiddler is displayed **within a 
tabset**, the <<currentTab>> variable *is* defined, and the <$tiddler> 
widget changes the <<currentTiddler>> value to match the title of the 
tiddler being displayed in the tab, allowing 'local' field references 
(i.e., {{!!!month}}) to work as desired.

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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/550d705e-2af9-44e6-8464-545acfb98f7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to