On Wednesday, February 15, 2017 at 9:25:53 PM UTC-8, Jeff Vance wrote:
>
> I'm very confused on how to manage the currentTiddler and {{!!title}}
> entries in a tiddler when it becomes transcluded. I get that this is a
> powerful feature that allows a template tiddler to take on the title of
> whatever tiddler it is transcluded into. But what about situations when I
> specifically don't want this? Is there a way to force it to use the
> original title?
>
Try this little trick:
At the beginning of each weekly tiddler, put
<$tiddler tiddler=<<currentTab>>
and at the end, put
</$tiddler>
When the weekly tiddler is viewed directly, <<currentTab>> will NOT have a
value, so the <$tiddler> widget will have no effect, and the weekly tiddler
will display as usual. However, when viewed in a tabset (i.e., as part of
the Yearly "roundup" of tiddlers), the <<currentTab>> value WILL be defined
and the <$tiddler> widget will set the <<currentTiddler> value to match the
<<currentTab>> value, instead of having <<currentTiddler>> unchanged (i.e.,
referencing the tiddler in which the tab set is contained).
Note, instead of modifying each and every weekly tiddler to put in this
"wrapper", you could use a template tiddler to automatically add the
<$tiddler>...</$tiddler> widget to each weekly tiddler shown in the tabset,
without editing any of those tiddlers directly.
Start by creating a tiddler (e.g., "YearlyTabsTemplate"), containing:
<$tiddler tiddler=<<currentTab>><$transclude mode="block"/></$tiddler>
Then, in your <<tabs>> macro, specify the "template:" parameter to be used
to render the tabs, like this:
<<tabs .... template:"YearlyTabsTemplate">>
That should do it. Let me know how it goes.
enjoy,
-e
Eric Shulman
TiddlyTools: Small Tools for Big Ideas(tm)
InsideTiddlyWiki: The Missing Manuals
--
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/510c0b51-6d41-47b8-ba03-3d4196f843c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.