How to use wikitext inside of list widget template?

81 views
Skip to first unread message

Mark S.

unread,
Jan 2, 2019, 8:16:31 PM1/2/19
to TiddlyWiki
If I have this text in a tiddler like MyTemplate:

; <$view field="caption"/>
: <$view field="description"/>
: <a href={{!!url}}><$view field="url"/></a>
: (<$link to=<<currentTiddler>>><<currentTiddler>></$link>)

and use it with the list widget:

<$list filter=... template="MyTemplate/>

The widget ignores the wikitext markup and I see literal : and ; symbols rather than terms and definitions.

But if I make it like this:

<$list filter=... />

{||MyTemplate}}
</$list>

Then it uses the markup. Shouldn't it use the markup when used as a template?

Thanks!
-- Mark

TonyM

unread,
Jan 2, 2019, 8:41:35 PM1/2/19
to TiddlyWiki
Mark,

I think I have seen this before. 

Quick check 
<$list filter=... template="MyTemplate"/>
Was missing a "

I have not used this form of template much before, but is it working like? 
{{MyTemplate}}
vs
{{||MyTemplate}}

Where one is a transclusion, the other is a transclusion using current tiddler values?

Regards
Tony

Mark S.

unread,
Jan 2, 2019, 8:49:21 PM1/2/19
to TiddlyWiki
I hand typed the example (not cut and paste) -- the quote mark was not missing in the original.

It's the 2nd form that works {{||template}}. Using {{template}} would just insert the contents of the template.

It would be a lot cleaner if template="MyTemplate" were to work.

Thanks!
-- Mark

Thomas Elmiger

unread,
Jan 3, 2019, 6:52:21 AM1/3/19
to TiddlyWiki
Hi Mark,

Do you have newlines around your content everywhere?

Good luck,
Thomas

Mark S.

unread,
Jan 3, 2019, 9:51:55 AM1/3/19
to TiddlyWiki
Do you mean in the template, or in the text? The text is just single-line fields. The template is formatted exactly as shown. I just tried it again, double-spacing the template lines. That just mashed all the output lines into one big paragraph, which is totally non-intuitive.

Thanks!
-- Mark

Thomas Elmiger

unread,
Jan 3, 2019, 4:13:20 PM1/3/19
to TiddlyWiki
You are absolutely right, Mark, this must be a bug.

I tested several variants, the result is always the same as

<$list filter="[tag[About]]">
{{||MyTemplate}}
</$list>

... where a blank line is missing after the first >.

Reply all
Reply to author
Forward
0 new messages