Transclusion question

58 views
Skip to first unread message

History Buff

unread,
Jan 26, 2021, 1:55:45 PM1/26/21
to TiddlyWiki
This may be fundamental, but I haven't been able to find the answer yet.

I've noticed a distinct difference in behavior between using transcluding a tiddler with the curly braces versus transcluding using the transclude widget. Specifically, I've noticed that using the curly braces, the currentTiddler variable is different between the two. The curly braces seems to use the currentTiddler as the origin tiddler whereas the transclude widget recognizes the currentTiddler as the tiddler where the transclusion is taking place.

Why is this and are there any other behavioral differences?

Soren Bjornstad

unread,
Jan 26, 2021, 2:24:22 PM1/26/21
to TiddlyWiki
<$transclude tiddler="My Tiddler">/>

is equivalent to

{{||My Tiddler}}

-- that is, don't change the current tiddler during the transclusion.

{{My Tiddler}}

is equivalent to

<$tiddler tiddler="My Tiddler">
  <$transclude tiddler="My Tiddler"/>
</$tiddler>

History Buff

unread,
Jan 26, 2021, 3:30:22 PM1/26/21
to TiddlyWiki
Duh, that's so obvious now. Thanks for pointing that out. I need to read more carefully.
Reply all
Reply to author
Forward
0 new messages