Transclude the Whole Tiddler

71 views
Skip to first unread message

Mohammad

unread,
Aug 1, 2018, 3:23:31 AM8/1/18
to TiddlyWiki

In another post I asked for thumbnail image of tiddler. In that post I encountered the issue to transclude a tiddler as a whole, that means a snapshot of tiddler trancluded, this include Tiddler text + title and what ever is shown in the original tiddler and also those contents come from customized ViewTemplate!

How this is possible?

Mark S: One solution is to get everything from tiddler and using CSS make a copy where we want the transclusion, but this seems impractical!
Ton: Other solution was to use Cecily theme!
Eric: Use transformation


Because I thought this can be of interest for other people I put the question in a separate post! I appreciate other solutions if any!



/Mohammad

FrD

unread,
Aug 1, 2018, 3:45:28 AM8/1/18
to TiddlyWiki
Hi,

I think Mark S. already answered your question in the thread about thumbnails : use
$:/core/ui/ViewTemplate
when transcluding


Regards

FrD

Mohammad

unread,
Aug 1, 2018, 3:55:44 AM8/1/18
to TiddlyWiki
That's quite true! Still there is a small problem!

Those setting contents come from tiddlers tagged with $:/tags/ViewTemplate are missing in this transclusion!
I mean you may apply settings or produce contents inside a tiddler tagged with $:/tags/ViewTemplate

Mohammad

FrD

unread,
Aug 1, 2018, 4:05:51 AM8/1/18
to TiddlyWiki
Hi,

Well that's strange ! If you look at the code of $:/core/ui/ViewTemplate you can see this near the end :

<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>

It seems the <$list> loop runs through all tiddlers tagged $:/tags/Viewtemplate.

Regards

FrD

Mohammad

unread,
Aug 1, 2018, 5:41:14 AM8/1/18
to TiddlyWiki
Thank you FrD!

I think I found the problem. My other tiddler with $:/tags/ViewTemplate has a code to show something for tiddlers tagged for example with slide!
When I transclude a tiddler tagged with slide using 

$:/core/ui/ViewTemplate

It seems the host tiddler is assumed not the transcluded one! I mean the code is run for the host tiddler not the transcluded one tagged with slide.

Mohammad
Reply all
Reply to author
Forward
0 new messages