if: Tests Conditions The 'if' tags allows you to test conditions and to take different actions depending on the conditions. The 'if' tag mirrors Python's 'if/elif/else' condition testing statements. Syntax If tag syntax:: [] ... [] The 'if' tag is a block tag. The 'if' tag and optional 'elif' tags take a condition variable name or a condition expression, but not both. If the condition name or expression evaluates to true then the 'if' block is executed. True means not zero, an empty string or an empty list. If the condition variable is not found then the condition is considered false. If the initial condition is false, each 'elif' condition is tested in turn. If any 'elif' condition is true, its block is executed. Finally the optional 'else' block is executed if none of the 'if' and 'elif' conditions were true. Only one block will be executed. Examples Testing for a variable:: The snake variable is true Testing for expression conditions:: num is greater than five num is less than five num must be five See Also "Python Tutorial: If Statements":http://www.python.org/doc/current/tut/node6.html#SECTION006100000000000000000