condition instruction

If the expression is TRUE, render the element. If the expression is FALSE, remove the tag and its children.

Syntax

<tag gwc:condition="expression" ...> 
... 
</tag>
Note:
  1. expression is a template expression
  2. When using expressions in a gwc:condition instruction, verification is done on the value of the expression. The condition is true if the following test is true
    Table 1. Value expression test for gwc:condition
    Expression Value Type Test
    Boolean Expression value is true.
    Numeric Expression value is not 0. (zero)
    String String is not empty or "0". (zero)
    Template path with identified node The identified element exists (i.e. formfield[edt1]).
    Template path with value The value is not empty if it is a string, or 0 if it is a numeric or boolean value (i.e. formfield[edt1]/id).