IF a == true OR b == true statement

MarkL picture MarkL · Nov 30, 2011 · Viewed 172.3k times · Source

I can't find a way to have TWIG interpret the following conditional statement:

{% if a == true or b == true %}
do stuff
{% endif %}

Am I missing something or it's not possible?

Answer

Andreu Ramos picture Andreu Ramos · Nov 30, 2011

check this Twig Reference.

You can do it that simple:

{% if (a or b) %}
    ...
{% endif %}