In a tab, make current be the tab name, not the tid calling the tab macro

54 views
Skip to first unread message

Mat

unread,
Jan 18, 2020, 2:12:27 PM1/18/20
to TiddlyWiki
The tiddler "MyTabs" contains 

<<tabs "SampleTabOne SampleTabTwo SampleTabThree SampleTabFour" "SampleTabOne" "$:/state/tab1">>

...and that first tiddler, SampleTabOne, contains

<<currentTiddler>>

Standing in MyTabs and clicking on the tab SampleTabOne I want appearing content in the tab to be the name SampleTabOne, not the name MyTabs. How?

Thank you!

<:-)

Mat

unread,
Jan 18, 2020, 3:16:25 PM1/18/20
to TiddlyWiki
Ooups! My exact problem is answered in the docs (see very bottom of tid). Sloppy reading on my part.

<:-)

TonyM

unread,
Jan 18, 2020, 5:52:27 PM1/18/20
to TiddlyWiki
Quick note

Tabs respond to the caption of each tab tiddler.

You can use a different template for tabs and include more in each tab like edit buttons and more.

Tony

Mat

unread,
Jan 18, 2020, 6:02:38 PM1/18/20
to TiddlyWiki
TonyM wrote:

Tabs respond to the caption of each tab tiddler.


Hm, what do you mean with "responds to"? I know you can add a caption to get another tab label. Anything else that can be done via "caption"?
 

You can use a different template for tabs and include more in each tab like edit buttons and more.


Yes, it was attempting to use the template parameter that triggered my original question here above. The way to access the tab tiddlers title is via "currentTab" instead of "currentTiddler". (Of course, one can $set name=currentTiddler value=currentTab if that is more useful)

<:-)

TonyM

unread,
Jan 18, 2020, 8:02:09 PM1/18/20
to TiddlyWiki

I am sure these note will help others in the future;


Hm, what do you mean with "responds to"? I know you can add a caption to get another tab label. Anything else that can be done via "caption"?

All I mean here is that the tabs macro will use the caption field on the tab tiddler if available. But yes we can include wiki text in the caption field and it will be wikified (last time I tried), thus the caption can be used to introduce colours and icons.
 
 

You can use a different template for tabs and include more in each tab like edit buttons and more.


Yes, it was attempting to use the template parameter that triggered my original question here above. The way to access the tab tiddlers title is via "currentTab" instead of "currentTiddler". (Of course, one can $set name=currentTiddler value=currentTab if that is more useful)

Yes this is an important fact for people wishing to make more sophisticated tabs.

You can also use the tiddler widget;

<$tiddler tiddler=<<currentTab>> >
The tab with be the current tiddler here
</$transclude>

Tony
Reply all
Reply to author
Forward
0 new messages