unless
The opposite of if and executes a block of code only if a certain condition is not met.
Input
-
user.name = 'John Doe'
{% unless user.name == 'John Smith' %}Hello Jane Smith{% endunless %}
Output
-
Hello Jane Smith
The opposite of if and executes a block of code only if a certain condition is not met.
user.name = 'John Doe'
{% unless user.name == 'John Smith' %}Hello Jane Smith{% endunless %}
Hello Jane Smith