IF a == true OR b == true 陈述IF、true、OR

由网友(吃货最怕做饿梦)分享简介:我找不到让 TWIG 解释以下条件语句的方法:I can't find a way to have TWIG interpret the following conditional statement:{% if a == true or b == true %}do stuff{% endif %}是我遗漏了...

我找不到让 TWIG 解释以下条件语句的方法:

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?

推荐答案

检查这个 Twig 参考.

你可以做到这么简单:

{% if (a or b) %}
    ...
{% endif %}
阅读全文

相关推荐

最新文章