Table of Contents
Previous Section
WOConditional { condition=YES|NO; [negate=YES|NO;] ... };
Description
A WOConditional object controls whether a portion of the HTML page will be generated, based on the evaluation of its assigned condition.
The negate attribute lets you use the same test to display mutually exclusive information; for example:
<HTML>
<WEBOBJECTS NAME="PAYING_CUSTOMER">Thank you for your order!</WEBOBJECTS>
<WEBOBJECTS NAME="WINDOW_SHOPPER">Thanks for visiting!</WEBOBJECTS>
</HTML>
PAYING_CUSTOMER: WOConditional {condition=payingCustomer;};
WINDOW_SHOPPER: WOConditional {condition=payingCustomer; negate=YES;};
- payingCustomer {
if (/* ordered something */) {
return YES;
}
return NO;
}