Cheatsheet
Operators
if foo
echo yes
else echo no
{{ foo ? 'yes' : 'no' }}
If foo
echo it, else echo no
:
{{ foo ? foo : 'no' }}
If foo
echo yes
else echo nothing:
{{ foo ? 'yes' }}
Returns the value of foo
if it is defined and not null, no
otherwise:
{{ foo ?? 'no' }}
Default
Returns the value of foo
if it is defined(empty values also count), no
otherwise:
{{ foo|default('no') }}