MvELSEIF#
Used in an statement to provide an alternate execution branch when the initial condition return false. Used in place of nested tags.
Syntax
<MvELSEIF EXPR = "{ expression } | variable name">
Using <MvELSEIF>
, multiple conditions can be used to determine which of several blocks of code to execute.
Attributes#
Attribute | Description |
---|---|
EXPR |
Returns a value interpreted as a conditional expression, typically involving a comparison, string, or logic operator. The expression must evaluate to true for MivaScript to process the code that follows the <MvELSEIF> tag. |
Example#
<MvIF EXPR="{ g.month LE 3 }">
First Quarter.<br>
<MvELSEIF EXPR="{ g.month LE 6 }">
Second Quarter.<br>
<MvELSEIF EXPR="{ g.month LE 9 }">
Third Quarter.<br>
<MvELSE>
Fourth Quarter.<br>
</MvIF>