\define code-link(tiddler)
<$set name=selected-tiddler value="$tiddler$" emptyValue=<<currentTiddler>> >
<$link to=<<selected-tiddler>>/>
<$codeblock language={{{[<selected-tiddler>get[type]]}}} code={{{[<selected-tiddler>get[text]]}}}/>
</$set>
\end
<<tabs tabsList:"[tag[demo]]" class:"tc-vertical">>
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/231b0bef-7553-4a5b-9a58-5d3c08e6b2b4%40googlegroups.com.
Hi MohammadI’m afraid I'm not quite following. The tabs macro intentionally doesn’t affect the current tiddler.Best wishesJeremy
When you use a tiddler with tabs macro Tiddlywiki refers to currentTiddler to the last tiddler in which rendering is occurred!
This make macros with currentTiddler as input parameter break and work wrongly!Isn't it better to remove this from tabs macro?Examplesee this macro\define code-link(tiddler)
<$set name=selected-tiddler value="$tiddler$" emptyValue=<<currentTiddler>> >
<$link to=<<selected-tiddler>>/>
<$codeblock language={{{[<selected-tiddler>get[type]]}}} code={{{[<selected-tiddler>get[text]]}}}/>
</$set>
\endUse it inside a tiddler say myTiddler tagged demo with no input parameter!Now in another tiddler put the below script<<tabs tabsList:"[tag[demo]]" class:"tc-vertical">>
You will see wrong result!--Mohammad--
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 tiddl...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/72ca2338-266e-4cb8-84fd-94875c34eeaa%40googlegroups.com.
Hi Mohammad
The reason the content of Test01 displays differently in the tiddler “Tabs Macro Example” is because the current tiddler is “Tabs Macro Example”, which is inherited by the transcluded content of Test01. When displaying Test01 on its own the current tiddler will be “Test01”.In other words, the tabs macro is a red herring. If you copy and paste the content of Test01 directly into “Tabs Macro Example” you’ll see the same output.Best wishesJeremy.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/72ca2338-266e-4cb8-84fd-94875c34eeaa%40googlegroups.com.
I understood transclusion is inheritable.
On Sunday, October 6, 2019 at 8:08:56 PM UTC+3:30, Jeremy Ruston wrote:The reason the content of Test01 displays differently in the tiddler “Tabs Macro Example” is because the current tiddler is “Tabs Macro Example”, which is inherited by the transcluded content of Test01. When displaying Test01 on its own the current tiddler will be “Test01”.
<$tiddler tiddler=<<currentTab>>
... normal tiddler content here ...
{{||$:/core/ui/Buttons/edit}}
</$tiddler>