Hi Tony,

I believe the fallback is not exactly emptyValue for a field's value - 
because if there is the field but it has no value - the TranscludeWidget 
will return empty. It is only if there is no field - that the fallback can 
be used. However, it appears it can be used by looking for the existence of 
a tiddler.

Cheers.

On Saturday, January 5, 2019 at 6:50:20 AM UTC+7, TonyM wrote:
>
> Info for all and thanks Thomas
>
> As in https://tiddlywiki.com/#TranscludeWidget
>
> *The TranscludeWidget 
> <https://www.google.com/url?q=https%3A%2F%2Ftiddlywiki.com%2F%23TranscludeWidget&sa=D&sntz=1&usg=AFQjCNHkLxNxA9l7Vcplk-jwi79jsxNc-w>
>  
> treats any contained content as a fallback if the target of the 
> transclusion is not defined (ie a missing tiddler or a missing field).*
>
> Explains why 
> <$transclude field="caption"><$view field="title"/></$transclude>
> works
>
> Of note here is we are asking to transclude a field, not a whole tiddler, 
> and this is a form of emptyValue
>
> This actually is a great tip because it provides a form of selective 
> display, a block of wiki text can be displayed, simpler to use than list or 
> reveal, that operates on the existence of a value, not yes or no.
>
> Regards
> Tony
>
>
>

-- 
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/eb13cec4-c446-4a75-b778-581ca5d47bcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to