MarkL MarkL - 3 months ago 9
Twig Question

IF a == true OR b == true statement

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

check this Twig Reference.

You can do it that simple:

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