Than you Saq!

I had read the «transclusion with templates" doc several times. The hint 
you've just gave me was not evident from my reading. Although I was 
skeptical about not finding the widget equivalent of {{tiddler||template}} 
because I know that each wiki syntax is translated into widgets.

Here is the code if the tiddler used as a form holds two fields 
"datasource" and "template". The block mode is needed for full wiki syntax 
support (like a !!title)

<$vars temp={{!!template}}>
<$tiddler tiddler={{!!datasource}}><$transclude tiddler=<<temp>> 
mode=block/></$tiddler>
</$vars>

Le mardi 27 avril 2021 à 17:45:35 UTC+2, [email protected] a écrit :

> Two things that might be helpful:
>
> 1) {{tiddlerName||templateName}}
>
> 2) the above is a shortcut syntax for
> <$tiddler tiddler="tiddlerName">
> <$translude tiddler="templateName">
> </$tiddler>
>
> See https://tiddlywiki.com/#Transclusion%20with%20Templates
>
> On Tuesday, April 27, 2021 at 5:24:01 PM UTC+2 [email protected] 
> wrote:
>
>> The transclude widget dos not offer any template use option.
>>
>> the wiki syntax for transclusion requires a fixed template although it 
>> allows for a computed source tiddler.
>>
>> That is:
>>
>> we can have {{<<ds>>!!temp}}
>>
>> but not {{<<ds>>!!<<temp>>}}
>>
>> and it would be fine to get <$transclude tiddler=<<ds>> 
>> template=<<temp>>/>
>>
>> I also tried to have a tiddler where the "datasource" and "template" 
>> field where valorized at my target values and whose text was
>>
>> {{<$transclude field=datasource>>!!<$transclude field=template/>}}
>> {{<$transclude field=datasource>>!!my-real-template}}
>>
>> the second form does work.
>>
>> I tried some tricks with text and wikify widgets, but I've never been 
>> able to parametize the template tiddler name on way or another.
>>
>> -- 
>> Jean-Pierre
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/24cf6f35-efc8-4b39-a072-945b32d015f0n%40googlegroups.com.

Reply via email to