I am using the if-extra for ModX. Is it possible to use mutliple operands, meaning write this code in a shorter way:
[[!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`
]]
Couldn't find a way to do it.
Aucun commentaire:
Enregistrer un commentaire