S S,

Sorry, my above comment was somewhat off topic. It was drawing out the 
behaviour that Thomas pointed out, with the transclude widget.

If we use the existence of a field as an indicator, then if it has a value 
or not may not matter. If the field does not exist (and thus cant have a 
value) the the fall back could display the code necessary to create that 
field. Just a possible mechanism that may be of use. If the field has a 
value it will return it, which is not allways desirable.

Regards
Tony


On Saturday, 5 January 2019 18:04:59 UTC+11, S. S. wrote:
>
> 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/30b7a8cd-8775-4082-a2bc-45f64a0cf063%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to