On this page:
The if_yield tag is a conditional tag and always used as an opening and closing pair, like this…
<txp:if_yield> ...conditional statement... </txp:if_yield>
Tag will accept the following attributes (case-sensitive):
- The (optional) value which the yield content must match in order for the contained statements to be executed. If this attribute is omitted, the tag returns ‘true’ if the yield content is defined. If this attribute’s value is omitted (i.e.
value="), the tag returns ‘true’ if yield content is defined, but has no value.
Example 1: Check if yield is defined
<txp:if_yield> Output_form was used as a container. <txp:else /> No yield defined. </txp:if_yield>
Example 2: Check if yield content is set
<txp:if_yield value=""> No yield, is empty. <txp:else /> Yield set: <txp:yield /> </txp:if_yield>
Other tags used: yield.
Example 3: Check against a specific yield content
<txp:if_yield value="red"> Yield is red. </txp:if_yield>
Tag support added.