This is great. Didn't know about <<currentTab>>... so many possibilities!

I appreciate the help!

Brian

On Thursday, June 6, 2019 at 12:19:21 PM UTC-6, Eric Shulman wrote:
>
> 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/19814a6b-d419-456e-ad72-bc8b678c3b46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to