On Thursday, November 5, 2020 at 10:21:42 PM UTC-8, Mohamed Amin wrote:
>
> as per the last part of "tabs Macro" Documentation 
> <https://tiddlywiki.com/#tabs%20Macro> , the <<currentTiddler>> will not 
> affected by "tab macro" which is understandable.
> My problem now is that I didn't understand how to overcome this using the 
> "TemplateTiddler" (example in the above link )
>

There are two ways to do this:

Method #1:
In each of the "ChildNN" tiddlers, add this line at the beginning:
<$tiddler tiddler=<<currentTab>>>

Method #2:
Create a separate tiddler (e.g., "TabsTemplate") containing
<$tiddler tiddler=<<currentTab>>>
<$transclude mode="block" />
</$tiddler>
then, in your tabs macro, write:
<$macrocall name="tabs" tabsList="Child01 Child02" template="TabsTemplate" 
/>

In either method, the $tiddler widget sets the currentTiddler value within 
the ChildNN tiddler to be the currentTab name (e.g., "Child01" or 
"Child02").  Note that if you view a ChildNN tiddler separately (i.e., 
outside of the tabset), then the currentTab value is undefined, and the 
$tiddler widget does nothing, which is OK, since the currentTiddler value 
will already correctly refer to the tiddler you are viewing.

-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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/61e28862-328f-4e5d-bff9-4505da7c9c2fo%40googlegroups.com.

Reply via email to