Variable Syntax
Overview
The Variable Processor in SmartSimple dynamically replaces variable references e.g.
{{firstname}}
with actual values (e.g., John). These variable references can be used throughout the system, allowing the same data to appear consistently in multiple locations. Previously, variable syntax used the @ symbol as part of the reference. However, this approach is not compatible with the rich text editor. To address this, we are introducing a new syntax that uses
{{ }}
instead of the @ symbol.
Below is a table outlining the changes. Note:
- The new syntax is currently in development and must be enabled by the SmartSimple team for your system.
- During this transition, both syntaxes can be used while the new format undergoes testing and refinement.
| Old Syntax | New Syntax |
|---|---|
@fieldname@ |
{{fieldname}}
|
@fieldname.value@ |
{{fieldname.value}}
|
test |
{{ssEncrypt(test)}}
|
test |
{{ssTranslate(test)}}
|
test |
{{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.[# … #]}}
|