I'm trying to create a template that will take a value from a variable, if 
present, or from a field of the current tiddler if the variable isn't 
defined. My first try was this filter:

{{{ [<articleName>else{!!myarticle}] }}}

To my surprise, the *else* doesn't work -- the filter works as expected if 
articleName is defined (the value of the variable articleName is output), 
but the output is just empty if articleName isn't defined, instead of 
containing the value of the *myarticle* field.

But this does work as expected:

{{{ [<articleName>!is[blank]else{!!myarticle}] }}}

I don't follow *why* this works and the first version doesn't, though, and 
I couldn't find much in the manual about this, so I would be grateful if 
someone could enlighten me. Is there a difference between an empty-string 
item and an empty list, and the title constructor yields an empty-string 
item when used this way? Are there other situations when I should have this 
in mind?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ff9df5bf-e0fc-4019-ba0b-dcc69296859cn%40googlegroups.com.

Reply via email to