iselseif Element
Use with <iselseif>
to specify a subcondition off an
<isif>
tag.
Syntax
<isif condition = if_expression>
...
<iselseif condition = elseif_expression> //0 or more
...
</iselseif>
<iselse>
...
</isif>
- condition
-
Allowed data type: string or expression.
elseif_expression evaluates to a boolean value. If the
<isif>
condition is true, the system executes the code immediately following the<isif
>
tag, ignoring the enclosed<iselseif>
and<iselse>
tags. If the<isif>
condition is false, the system ignores the code immediately following the<isif>
tag, and then tests each<iselseif>
condition in order. When the system finds a true<iselseif>
condition, the system executes the code immediately following the<iselseif>
tag and ignores any remaining<iselseif>
and<iselse>
tags. If all<iselseif>
conditions are false, the system executes the code following the<iselse>
tag.
Example
In this example, the system determines if the product name equals 'case' or 'bag'. If it does, it shows the word Monogram. If it doesn't, it continues processing.<thead>
<tr>
<th>Qty.</th>
<th colspan="2">Description</th>
<isif condition ="{$pdict.Product.name} == 'case'}">
<th>Monogram</th>
<iselseif condition ="{$pdict.Product.name} == 'bag'}">
<th>Monogram</th>
<iselse>
<th>Unit Price</th>
</isif>
<th>Item Total</th>
<th> </th>
</tr>
</thead>