Hi,
@Tobias :
Well my "real life" template is a it complicated but it's easy to make an
experiment.
Suppose the template you want to use is : <<somevariable>><<now>>
{{!!title}}
In a test template you can try 3 ways of writing the template :
\define myFilter() foobar$(somevariable)$ +[removesuffix[foobar]]
First expression :
<<somevariable>><<now>> {{!!title}}
Second expression :
<$set name="somevariable1" filter=<<somevariable>> value=<<somevariable>>
emptyValue="Default value">
<<sometext1>><<now>> {{!!title}}
</$set>
Third expression :
<$set name="somevariable1" filter=<<myFilter>> value="Default value"
emptyValue=<<somevariable>>>
<<sometext1>><<now>> {{!!title}}
</$set>
@Andreas :
You're right : the filter design is the point. I came to the same
conclusion and that's why I've been using this strange filter.
But it's twisted and I was wondering if there was a simpler way to specify
a default value.
Thanks to both of you !
FrD
--
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 http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/d96e523d-f555-4bc6-ad51-4e58ca2196e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.