How to embed template tiddlers?

76 views
Skip to first unread message

talha131

unread,
Sep 9, 2020, 3:32:57 PM9/9/20
to TiddlyWiki

I have simple template that I use with tabs widget, say, $:/talha131/Template/VerticalTab

<$tiddler tiddler=<<currentTab>>>
<$link to={{!!title}}>
! <$view field="title" />
</$link>

<$transclude mode="block" />

</$tiddler>

I have defined a separate template tagged with $:/tags/ViewTemplate that shows source-url field from the tiddler, say, $:/talha131/Template/TiddlerMeta

I want to embed TiddlerMeta into VerticalTab template. So that the macros that use VerticalTab will also show TiddlerMeta.

I can copy paste code from TiddlerMeta to VerticalTab. But this means if I make any changes in the TiddlerMeta, it will not be automatically reflected in the VerticalTab template.

I have tried using

<$transclude tiddler={{$:/talha131/Template/TiddlerMeta}} mode="block" />

But this did not work.

Saq Imtiaz

unread,
Sep 9, 2020, 4:03:58 PM9/9/20
to TiddlyWiki
Try this:

{{||$:/talha131/Template/TiddlerMeta}} inside $:/talha131/Template/VerticalTab

talha131

unread,
Sep 9, 2020, 4:12:37 PM9/9/20
to TiddlyWiki
Thank you, Saq, this fixed the issue.


Eric Shulman

unread,
Sep 9, 2020, 5:47:54 PM9/9/20
to TiddlyWiki
On Wednesday, September 9, 2020 at 12:32:57 PM UTC-7, talha131 wrote:

I have tried using

<$transclude tiddler={{$:/talha131/Template/TiddlerMeta}} mode="block" />

But this did not work.

The tiddler parameter should be a quoted title, not using {{...}}, like this:
<$transclude tiddler="$:/talha131/Template/TiddlerMeta" mode="block" />

-e
Reply all
Reply to author
Forward
0 new messages