Then Context

[If Expressions][Then]do this[/Then][Else]otherwise this[/Else][/If]

New in 4.0
Displays HTML conditionally only if the expression is true.

To display some HTML (or execute WebDNA [xxx] tags) only if certain conditions are met, place the text inside an [If] context. The comparison, which may contain any [xxx] tags, is first evaluated to see if it is true, and if true then the contained [Then] context is executed (or simply displayed, if it's just HTML). If not true, then the contained [Else] context is executed (or simply displayed, if it's just HTML). See [Then] and [Else].

Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):

[If (("[username]"="Grant") | ([grandTotal]<100)) & ({[date]}<{2/15/2000})]
    [Then]either username was Grant or grandTotal was < $100 and it's not Feb 15, 2000 yet[/Then]
    [Else]The complex expression wasn't true[/Else]
[/If]

See [If] for full explanation of syntax.

User Contributed Notes
ThenContext  

Copyright © 2008 WebDNA Software Corporation, Inc.