Thank you to both of you for your explanation. The information on the 
system tag was very helpful.

@Soren: you write tgis in your textbook:

Here are some things that *change the current tiddler*:

   - Transcluding another tiddler with the {{curly braces}} syntax.
   - Using a $list widget to enumerate the outputs of a filter.
   - Directly setting currentTiddler with a $set or $vars widget.

Does it mean that you can change the content of a var or that you stack up 
vars, getting only the values from the top var?

Could it be used to have some kind of recursion in a safe way? I was 
thinking of vars as immutable stuff because of the syntax that declare them 
but no syntax to alter them otherwise.

And finnally, in a number of my templates, the template content is only 
<<myMacro>>. It seems a bit out of touch with what your telling me with 
what template are. In effect, myMacro is only used there. Would it b a 
better idea to ditch the macro and have the macro body directly into the 
template text? (yes, myMacro has no params.)

regards,

-- 
Jean-Pierre
Le lundi 28 juin 2021 à 16:18:20 UTC+2, Soren Bjornstad a écrit :

> 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/dec36e17-504d-4b05-9e10-c7884c13b836n%40googlegroups.com.

Reply via email to