unless


Like case and if tags, unless tags controls the display of information based on a condition. Unlike if tags, an unless tag displays the template block only if the condition returns false. Unless tags cannot use elseif and else tags within them.


Syntax


{% unless <Conditions> %}

<Template Block>

{% endunless %}



Arguments

Condition - An expression that must resolve to a true or false value. Display of the template block occurs only if the condition returns false.


Boolean Operators

These operators combine conditions together

  and - Both conditions must evaluate to true

  or - At least one condition must evaluate to true


Comparison Operators

These operators typically compare parameters with a set value

  == - Used with strings or numerical values. Returns true if the left side of the condition equals the right side

  != - Used with numerical values. Returns true if the left side of the condition does not equal the right side

  <> - Used with numerical values. Returns true if the left side of the condition does not equal the right side

  < - Returns true if the left side of the condition is numerically less than the right side

  <= - Used with numerical values. Returns true if the left side of the condition is numerically less than or equal to the right side

  > - Used with numerical values. Returns true if the left side of the condition is numerically greater than the right side

  >= - Used with numerical values. Returns true if the left side of the condition is numerically greater than or equal to the right side

  contains - Used with strings or array values. Returns true if the left side of the condition includes the right side of the condition within it.


Example:

InputParameter Value


'Orange'



Input


My favorite animal is:{% unless InputParameter == 'Orange' %}

Not a fox

{% endunless %}



Output


My favorite animal is: