if-PREFIX-field
Summary
- [if-PREFIX-field column] column value is true [else] column value is false [/else] [/if-PREFIX-field]
Description
This loop sub-tag looks up the value of the named column,
for the current row,
in one of several places,
in this order:
- The first DefaultTables table.
- Additional DefaultTables table(s) in the order they occur.
- The attribute value for the row in a hash list.
- Blank.
If the column's value evaluates true (non-blank and non-zero)
then the IF text will be returned.
If it evaluates false then the text in the optional
[else] block will be returned.
You can reverse the IF text and ELSE text by using the "!" (not) operator,
as follows:
[if-PREFIX-field !column]
IF (not found) text
[else]
ELSE (found) text
[/else]
[/if-PREFIX-field]
|
You can test the column for a specific value,
using any of the Interchange test operators,
as follows:
[if-PREFIX-field column =~ /kevin|walsh/]
Yay!
[else]
Bah!
[/else]
[/if-PREFIX-field]
|