<$transclude field="caption">
<$view field="title"/><$transclude field="caption"/>
<$reveal type="match" value={{!!caption}} text=""><$view field="title"/></$reveal>I think if you try it you'll see that Ton's method works. It's one of those undocumented features of how the widgets work. If the widget doesn't evaluate to anything, then the inner contents are used.
On Tuesday, March 20, 2018 at 7:12:33 AM UTC-7, Michael Wiktowy wrote:Unless you wrap the <$view field="title"/> in a RevealWidget that matches on a blank ("") caption field, you will display both when a caption field is present.<$transclude field="caption"/>
<$reveal type="match" value={{!!caption}} text=""><$view field="title"/></$reveal>
Note that a lot of things (TOC headings and Tab Titles) do this by default. So you can dig into those macros to maybe find a more efficient way/Mike
On Tuesday, March 20, 2018 at 9:34:28 AM UTC-4, Ton Gerner wrote:Hi Michael,
Try<$transclude field="caption">
<$view field="title"/>
Cheers,
Ton
--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c304780b-67c1-4fc7-b3d0-1dfebfc7776d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<$transclude filed='caption'>
<$view field='title'/>
</$transclude><$view field='caption'>
<$view field='title'/>
</$view>