if-PREFIX-modifier
Summary
- [if-PREFIX-modifier attribute] attribute value is true [else] attribute value is false [/else] [/if-PREFIX-modifier]
Description
If the current row was provided by a hash list looping tag,
such as [item-list],
then this sub-tag will look at the "attribute" hash key.
If the attribute'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-modifier !attribute]
IF (not found) text
[else]
ELSE (found) text
[/else]
[/if-PREFIX-modifier]
|
You can test the attribute for a specific value,
using any of the Interchange test operators,
as follows:
[if-PREFIX-modifier attribute =~ /kevin|walsh/]
Yay!
[else]
Bah!
[/else]
[/if-PREFIX-modifier]
|
See also