[TW5] Maintain Current Tiddler in transcluded code

81 views
Skip to first unread message

TonyM

unread,
Dec 23, 2017, 7:28:29 PM12/23/17
to TiddlyWiki
Folks,

I seem to have stepped on my own toes and broken something. Perhaps someone knows the answer.

I have a Tiddler tagged $:/tags/TiddlerInfo to make in visible in each tiddlers info drop down

The Tiddler contains some lists and macro calls that work fine, updating the current tiddlers fields
This tiddler in turn also transcludes a number of tiddlers, so that they can be reused elsewhere.

eg; {{$:/PSaT/tiddler-disposition/infotab/header}}

Unfortunately these transcluded tiddlers seem to be considered the current tiddler when the info panel reference fields via macros.
When the original tiddler uses the info panel the fields are updated not in it, but in the twice removed transcluded tiddlers.

I did wrap these transclusions in

<$tiddler>
</$tiddler>

But they no longer seem to work

Any Ideas?

Thanks in advance

PS Happy Christmas Eve for those that celebrate it, we are approaching midday Christmas eve here in Sydney.
 
Tony







Birthe C

unread,
Dec 23, 2017, 7:47:20 PM12/23/17
to TiddlyWiki
Merry Christmas, TonyM,

If you transclude using the transclude widget it will try to use fields from the tiddler it is transcluded to. Use {{}}} instead -at least  I think.


Birthe
It is late night here in Denmark, cold and dark but no snow. AND I had lot of hot punch...that is why I am not sure ;-)


Joshua Fontany

unread,
Dec 23, 2017, 7:48:38 PM12/23/17
to tiddl...@googlegroups.com
I have run into this problem also. The default wikitext shortcut for transclusion:
{{TiddlerName}}
actually set 2 nested widgets:
<$tiddler tiddler="TiddlerName">
<$transclude tiddler="TiddlerName">
</$transclude>
</$tiddler>


So, you have a couple of options.

Use the shortcut wikitext and leave the "TiddlerName" portion blank, but set the "TemplateName":
{{||TemplateName}}

Or simply specify only the Transclude Widget:
<$transclude tiddler="TemplateName">
</$transclude>

Tiddlywiki Docs Reference: https://tiddlywiki.com/#Transclusion%2520with%2520Templates.html

Best,
Joshua Fontany

TonyM

unread,
Dec 23, 2017, 11:37:24 PM12/23/17
to TiddlyWiki
Joshua,

{{||TemplateName}} Works perfectly thanks

Tony
Reply all
Reply to author
Forward
0 new messages