PDA

View Full Version : Correct syntax for if AND/OR?


MTGDarkness
05-02-2009, 01:47 PM
I can't figure out or find the correct syntax for an and/or form on the template conditionals.

Dismounted
05-02-2009, 01:54 PM
<if condition="$foo == 'bar' AND $bar == 'foo'">
<if condition="$foo == 'bar' OR $bar == 'foo'">

MTGDarkness
05-02-2009, 01:57 PM
Okay. And stacked? Like say I want it to be if something or something and another something? Would it then be <if condition="$foo == 'bar' OR $bar == 'foo' AND $bar2='foob'">

Dismounted
05-02-2009, 02:28 PM
Treat it like algebra in maths - i.e. use brackets.