The Variable Processor replaces variable references, such as {{firstname}}, with actual data values, such as John, throughout SmartSimple. SmartSimple supports two variable syntax options: the original @ symbol syntax and a double curly brace syntax {{ }}. The @ symbol syntax is not compatible with the rich text editor, so the double curly brace syntax provides a compatible alternative.
Enable the New Variable Syntax
To enable the new syntax:
- Click the System Administration gear in the upper navigation bar, select Global Settings, and then click the System tab.
- Locate the System Options section, and toggle Enable New Variable Syntax Set on.
⚠ WARNING Enabling the new syntax while the old syntax is still in use may affect variable processor performance. Do not disable the old syntax until all variable references have been manually updated and confirmed.
Old Syntax vs. New Syntax
The following table lists each old syntax pattern and its new equivalent.
| Old Syntax | New Syntax |
|---|---|
| @fieldname@ | {{fieldname}} |
| @fieldname.value@ | {{fieldname.value}} |
| <ssEncrypt>test</ssEncrypt> | {{ssEncrypt(test)}} |
| <ssTranslate>test</ssTranslate> | {{ssTranslate(test)}} |
| <ssEscape>test</ssEscape> | {{ssEscape(test)}} |
| <!--@sslogic(condition)--> | {{ss_if(condition)}} |
| <!--@else if(condition)--> | {{ss_elseif(condition)}} |
| <!--@else--> | {{ss_else}} |
| <!--end--> | {{ss_endif}} |
| <!--@sscalculation(expression)--> | {{ss_eval(expression)}} |
| @ssGet(...)@ | {{ssGet(...)}} |
| @system.fieldname@ | {{system.fieldname}} |
| @xml.fieldname.nodename@ | {{xml.fieldname.nodename}} |
| @parent.fieldname@ | {{parent.fieldname}} |
| @ReportProperty(...)@ | {{ReportProperty(...)}} |
| @parent.[# ... #]@ | {{parent.[# ... #]}} |