[TW5] Wikitext formatting in ViewTemplate templates

78 views
Skip to first unread message

Mal

unread,
Apr 9, 2017, 11:54:01 PM4/9/17
to TiddlyWiki
All,

When I create a tiddler containing just "! {{!!title}}" (without quotes) and tag it with "$:/tags/ViewTemplate", I see the title of each tiddler repeated at the bottom of its text box.  However, the heading formatting is not rendered as expected.  If I use character formatting like italics or underline the text appears correctly with the appropriate formatting.

Am I missing something here?  Is there some limitation on allowable wikitext formatting in ViewTemplate templates?

Thanks,

Mal

Jed Carty

unread,
Apr 10, 2017, 2:52:49 AM4/10/17
to TiddlyWiki
If I remember correctly this is because whitespace is trimmed for transclusions used by view templates.

If you use

<p>

! {{!!title}}
</p>

it should work.

Mal

unread,
Apr 10, 2017, 5:17:57 AM4/10/17
to TiddlyWiki
Thanks Jed.  That did the trick.

Regards,

Mal


Thomas Elmiger

unread,
Apr 10, 2017, 1:16:50 PM4/10/17
to TiddlyWiki
Hi

I don’t think that surrounding a title with a paragraph is correct in HTML, so I would rather use a div or a span.

Good luck!
Thomas
Reply all
Reply to author
Forward
0 new messages