【发布时间】:2016-01-30 12:44:26
【问题描述】:
我正在为 ModX 使用 if-extra。是否可以使用多个操作数,这意味着以更短的方式编写此代码:
[[!If?
&subject=`[[!getUrlParam? &name=`id`]]`
&operator=`EQ`
&operand=`1`
&then=`do something`
]]
[[!If?
&subject=`[[!getUrlParam? &name=`id`]]`
&operator=`EQ`
&operand=`2`
&then=`do something`
]]
[[!If?
&subject=`[[!getUrlParam? &name=`id`]]`
&operator=`EQ`
&operand=`3`
&then=`do something`
]]
找不到办法。
【问题讨论】:
标签: if-statement modx modx-revolution