Transcluding Tiddlers

53 views
Skip to first unread message

Tyler Harris

unread,
Apr 4, 2022, 12:53:52 AM4/4/22
to TiddlyWiki
Does any one know how to do this:
<<tiddler [[TiddlerName]] with: "variable">>
in TiddlyWiki5?
Actually, I would like the variable to be from a field. I really would like to know how to do this:
<<tiddler [[TiddlerName]] with: '<$view field="FieldName" />'>>
Thanks.

PMario

unread,
Apr 4, 2022, 4:23:24 AM4/4/22
to TiddlyWiki
Hi,

You create a tiddler named eg: `myTemplate`, that contains the code: `<$view field="FieldName" />'` in the text. Don't use the backticks (`)

```
title: myTemplate
text: <$view field="FieldName" />
```

You can use the template like this:

```
{{TiddlerName||myTemplate}}

or

<$tiddler tiddler=TiddlerName>
<$transclude tiddler="myTemplate" />
</$tiddler>
```


have fun!
mario

PS: The backticks (`) in this post are only used, that the code is shown in the right way at talk.tiddlywiki.org
Reply all
Reply to author
Forward
0 new messages