> > I've read in the doc that widgets are the fundamental part of tiddlywiki > and that all wiki syntax sugar is finally resolved as a number of widgets. > > Use of template is only described with transclusion as {{||template}} > (with tiddler or field or index before ||). > > the transclude widget has no template attribute. > > How then is done the transclusion? Shouldn't the transclude widget have a > template attribute? >
Actually, the *template *is what's being transcluded during a transclusion, not the tiddler. When you transclude a tiddler through a template, the current tiddler is set to that tiddler and then the template is transcluded. {{Tiddler||Template}} evaluates to: <$tiddler tiddler=Tiddler> <$transclude tiddler=Template/> </$tiddler> {{||Template}} doesn't change the current tiddler and so evaluates to simply: <$transclude tiddler=Template/> {{Tiddler1}} is shorthand for {{Tiddler1||Tiddler1}}, and evaluates to: <$tiddler tiddler=Tiddler1> <$transclude tiddler=Tiddler1/> </$tiddler> More on templates and current tiddlers <https://groktiddlywiki.com/read/#Templates%20and%20the%20Current%20Tiddler> from my TiddlyWiki textbook. > Also, I've come across $:/tags/ViewTemplate which is only described as: > "The system tag <https://tiddlywiki.com/#SystemTags> $:/tags/ViewTemplate > marks the view template." which is not very telling. > I've done tenplates tgat work fine. They are not > tagged $:/tags/ViewTemplate. If I tag them as scuch, they act aout as if > their content was twice included. What does $:/tags/ViewTemplate really do? > How should it be used? > Haha, some of those tag explanations could use some work. TiddlyWiki just transcludes all the tiddlers with that tag in sequence when it is rendering each tiddler: <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"> <$transclude tiddler=<<listItem>>/> </$list> So the view template is essentially a list of templates that get *automatically* transcluded for every tiddler without mentioning them in your wikitext. This includes things like the title, the tags bar, and so on. More on the view template <https://groktiddlywiki.com/read/#The%20View%20Template>. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/bf3dcb60-76bd-4685-a4fd-643418e3d8c5n%40googlegroups.com.