Hi Tobias,
I can see it's not easy to explain my use case.
In some occasions I find it easier to pass some parameters to a template. It allows me to write more generic templates and re-use them in different contexts
So inside the template I put some placeholders for variables to be defined, like $(somevariable)$.
When the variables are defined when the template is called, it works fine. But I'd like to be able to call the template without defining all the variables : to have default values.
The default value of a variable is supposed to be used by the template when the variable is not defined when the template is called.
So inside the template I have to check whether the variable is defined or not :
If the variable is defined, that's fine, let's use its value.
If not, the default value is affected to the variable.
The set widget allows to affect a value to a variable according to the result of a filter (empty list of tiddlers or not). So I tried to go this way.
But my problem was to design the filter. I ended with a fancy filter.
I was wondering if there is a better way to do that :
- using something else than the set widget with the filter and emptyValue,
- or using a more straightforward filter.
I hope it's a bit clearer now ?
FrD