Tags

If

Overview:

The if tag is used to decide whether or not a certain block of code should run.

If can be used with Else and Elseif to handle complex decisions where more than one outcome may be desired.

 

Example:

<!--- If the user's first name is "Kevin", output an extra message --->
  This is just a normal page...
   <if client_firstname EQ "Kevin">
	...unless your name is Kevin.
   </if>

<!--- Choose between two different colors --->
  <var my_color = "blue">
  <if my_color EQ "red">
	The color is red
  <else>
	The color is not red
  </if>

<!--- Choose between three different colors --->
  <var my_color = "blue">
  <if my_color EQ "red">
	The color is red
  <elseif my_color EQ "blue">
	The color is blue
  <else>
	The color is not red or blue
  </if>
 

See Also...