IF a == true OR b == true statement

前端 未结 2 957
不思量自难忘°
不思量自难忘° 2021-02-01 11:42

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 missi

2条回答
  •  遥遥无期
    2021-02-01 12:36

    check this Twig Reference.

    You can do it that simple:

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

提交回复
热议问题