A simple method of conditionally rendering content lies in LXP’s native support for a small set of branching logic tags. These allow you to either display or hide regions of markup by performing equivalence checks on variables or cookies. LXP’s basic branching logic tags include:
<ifnot> tags operate on LXP
variables (or object variable values), whereas the <ifcookie> and <ifnotcookie>
tags operate on stored cookies for the current domain. In other words, the logical functions of
<ifcookie> are the same; only the
sources for logical evaluation differ.
<else> tag is more generalized, and implements subsequent,
inverted logic evaluations on any of the previously mentioned tags. The
<elseifnot> tags are actually just
shortcut tags with the same result as nesting an
<ifnot> tag within an
When used without any
accompanying attributes, the
<ifnot> tags perform no useful function. However, with meaningful
attributes, these tags can be used to quickly and simply flag regions of mark-up for display
under specific circumstances.
<if> tag examines its defined attributes through
equivalence comparisons to variables whose names match the attribute names. If the specified
attribute’s value matches the variable’s value exactly, the region of mark-up between that
<if> and its associated
</if> closing tag will be processed ...