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:
-
<if>
-
<ifnot>
-
<ifcookie>
-
<ifnotcookie>
-
<else>
-
<elseif>
-
<elseifnot>
The <if> and <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 <if> and
<ifcookie> are the same; only the sources for logical evaluation differ.
The <else> tag is more generalized, and implements subsequent, inverted logic
evaluations on any of the previously mentioned tags. The <elseif> and
<elseifnot> tags are actually just shortcut tags with the same result as nesting an
<if> or <ifnot> tag within an
<else> region.