dotliquid支持像and/or这样的基本运算符。
Basic operators
Operator Function
== equals
!= does not equal
> greater than
< less than
>= greater than or equal to
<= less than or equal to
or condition A or condition B
and condition A and condition B是否支持'not‘作为运算符?
发布于 2016-08-03 17:40:43
它包含unless作为控制流,如下所示:
https://shopify.github.io/liquid/tags/control-flow/
这意味着:
if a && b && !c
# ...
end翻译为:
{% if a and b %}
{% unless c %}
...
{% endunless %}
{% endif %}https://stackoverflow.com/questions/38739830
复制相似问题