MarkL MarkL - 1 year ago 211
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 Source

check this Twig Reference.

You can do it that simple:

{% if (a or b) %}
{% endif %}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download