Transclusions with variable template

transclusion with template is documented only for constant templates suc ah {{mytiddler||mytemplate}}

But in my case both tiddler and template ar dynamic. I saw somewhere in the doc to use:

<$tiddler tiddler=<<mytiddler>>>
  {{||mySTATICtemplate}}
</$tiddler>

So I tried to extend it by:

<$tiddler tiddler=<<mytiddler>>>
  <$transclude $tiddler=<<mytemplate>>/>
</$tiddler>

But it doesn’t produce the templating I wanted. Any idea? Why don’t we have a $template modern attribute for the $transclude widget?

Have a closer look at: $transclude $variable --> template? - #11 by pmario and the following posts

Hi @jypre the $tiddler attribute of the transclude widget does identify the template to be rendered. The thing that {{mytiddler||mytemplate}} does that isn’t done by the transclude widget is the assignment of “mytiddler” to the variable “currentTiddler”.

I have difficulties with this transclusion stuff. I confess being tired, but it seems to be in such a regular basis that I hae to make it nonetheless.

If I understand you (@jeremyruston) correctly, the two following snippet do the very same thing:

{{mytiddler||mytemplate}}

and

<$tiddler tiddler=mytiddler>
  <$transclude $tiddler=mytemplate/>
</$tiddler>

So in theory, the answer to my initial problem is really:

<$tiddler tiddler=<<myMacroForTiddlerTitle>>>
  <$transclude $tiddler=<<myMacroForTemplateTitle>>/>
</$tiddler>

OK, but in fact, I,m using a $list widget for getting the tiddler to be on display. So that I can code it in two ways, if I,m still OK so far:

<$list variable=here filter=<<myFilter>>>
   <$let myTemplate = {{{ [<here>.getMyTemplate[]] }}} >
     <$tiddler tiddler=<<here>>>
        <$transclude $tiddler=<<mytemplate>>/>
     </$tiddler>
  </$let>
</$list>

or directly without variable

<$list filter=<<myFilter>>>
   <$let myTemplate = {{{ [<currentTiddler>.getMyTemplate[]] }}} >
     <$transclude $tiddler=<<mytemplate>>/>
  </$let>
</$list>

If I got problem having what I want on screen with either of those codes, the problem must lay in the templates I use, all right? I confess that I’m afraid that playing with templates is a risky activity as I frequently enter neverending loops and this is difficult to guess where lays the cause for it.

I wish I could froze the javascript console output to be able to read what is happening. I,m thinking about a screen grabber (not photos, but films) in order to get a look at this in a meaningful way.

Last, the " Transclusion with Templates" official doc dores nowhere speak about the transclude or tiddler widgets. It really should from all thje answers I got so far. The code equivalent I recall here would be very well fitted in.

Writing technical docs is hard.Improving them is hard too.