> 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.

The behaviour is documented, but perhaps is unclear 
(https://tiddlywiki.com/#TranscludeWidget 
<https://tiddlywiki.com/#TranscludeWidget>):

The TranscludeWidget <https://tiddlywiki.com/#TranscludeWidget> treats any 
contained content as a fallback if the target of the transclusion is not 
defined (ie a missing tiddler or a missing field).

Best wishes

Jeremy.

> 
> 
> 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 [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywiki 
> <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
>  
> <https://groups.google.com/d/msgid/tiddlywiki/c304780b-67c1-4fc7-b3d0-1dfebfc7776d%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 post to this group, send email to [email protected].
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/0FABB73C-0486-41B2-A2E8-7130120244C6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to