0
edits
Changes
→How to display different content based on a value using SmartLogic
</pre>
==How to display different content based on a value using SmartLogicSSlogic==
To display content based on a value from a variable add '''<!--@sslogic('@branch.name@'='Internal Staff')-->''' in front of the content and '''<!--@end-->''' at the end of the content. If there are 2 different pieces of content to be displayed based on a value and all others add '''<!--@else-->''' between the 2 pieces of content.
<pre>
<!--@sslogic('@branch.name@'='Internal Staff'CONDITION)--> This The content to be displayed when condition is internal staff <!--@else-->true. This is NOT internal staffcan be more than one line.
<!--@end-->
</pre>
* The content to be displayed (the middle line) can either be in plaintext or in HTML.
* Be sure there are single quotes around the variable and value.
* SSlogic does not support nested logic statements.
'''NoteExample:''' SmartLogic does not support nested logic statements. You can use SSLogic to * The following will display data stored in a combo box in SmartSimple as check boxes in a Web Page View. For example, Christmas tree image if you have a pull-down box named 'clientgener' that you would like to be displayed as 2 check boxes on the Web Page View you would use the followingmonth is December:
<pre>
<!--@sslogic('@clientgender@'month(now())='Male'12)--> <input typeimg src="checkbox" value="checkbox" checked> Male <input type="checkbox" value="checkbox"> Female<!--@else--> <input type="checkbox" value="checkbox"> Male <input type="checkbox" value="checkbox" checked'images/xmasstree.jpg'> Female
<!--@end-->
</pre>
==How to display check boxes in the Web Page View==