[TOC] [Prev] [Next] [Bottom]



<@IFEMPTY> <@ELSE> </@IF>

Syntax

<@IFEMPTY VALUE=value>
trueSubstitutionText
[<@ELSE>
falseSubstitutionText]
</@IF>

Description

If the value specified in VALUE is an empty string, <@IFEMPTY VALUE=value><@ELSE></@IF> includes trueSubstitutionText; otherwise, it includes falseSubstitutionText. The VALUE attribute value may be a meta tag or literal value (though it makes little sense to use a literal value). The <@ELSE> portion is optional.

The trueSubstitutionText and falseSubstitutionText may include other <@IF>,<@IFEMPTY>, and <@IFEQUAL> meta tags.

Mac OS

Macintosh only: These tags may be nested up to 12 levels; beyond this limit, an error is returned.

Example

<@IFEMPTY VALUE="<@CGIPARAM NAME='USERNAME'>">
Here are the guest options:
...guest options...
<@ELSE>
<@IF "<@CGIPARAM NAME='USERNAME'>=Admin">
<H3>Administrator Options</H3>
...administrator options...
<@ELSE>
<H3>Hi, <@CGIPARAM NAME="USERNAME">!</H3>
Here are your options
...user options...
</@IF>
</@IF>

This example returns different HTML based on the value of <@CGIPARAM NAME="USERNAME">.

See Also

<@IF>, <@ELSEIF>, <@ELSEIFEMPTY>, <@ELSEIFEQUAL>, </@IF>
<@IFEQUAL> <@ELSE> </@IF>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1998, Pervasive Software Inc. All rights reserved.