I think, it would be great to have an option to use conditions in templates.
I think it's syntax should be like:
{%if <condition1>%}
...block to include if <condition1> is true
{%elif <condition2>%}
...block to include if <condition2> is true
{%else%}
...block to include if <condition1> and <condition2> both are false
{%endif%}
also it should support inversion:
{%if !<condition1>%}
...block to include if <condition1> is false
{%endif%}
For example, a common template could be like this:
I think, it would be great to have an option to use conditions in templates.
I think it's syntax should be like:
also it should support inversion:
For example, a common template could be like this:
Currently if there are no highlights, there will be empty callout.
But with conditions, callout will be only if there is any highlight
Also it can work with selectors: