-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Consider an element that needs to have an attribute set when a certain configuration value is set (non-empty).
So, attribute test should only be set if $config?test is anything else but the empty sequence.
Currently this is only possible way do express this is by writing
[% if (empty( $config?test )) %]
<my-element />
[% else %]
<my-element test="[[ $config?test ]]"/>
[% endif %]When we now have two or more of those conditional attrbutes the element template has to be duplicated for each possible combination of those flags.
This is not feasible and error prone.