Difference between revisions of "SSlogic"

From SmartWiki
Jump to: navigation, search
(No difference)

Revision as of 11:55, 2 June 2009


Web Page View fields can use a unique SmartSimple logic interpreter. Web page logic gives you the ability to display certain content or perform certain actions only when specified conditions are met. SmartSimple logic follows the following template: The content to be displayed when condition is true

Condition is replaced with the logical condition that your case calls for. The following code sample will display a Christmas tree image if and only if it is currently December: <img src='images/xmasstree.jpg'>

Note that the content to be displayed (the middle line) can either be in plaintext or in HTML.

Often, you will want to display one of two texts--one text in the case that a condition is met and another in the case that the condition is not met. This is achieved through the use of an "else" operator. The following sample code will display one message if a user is male and another if the user is female: You are a guy. You are a girl.