Difference between revisions of "Variable Syntax"
From SmartWiki
Mark Bridger (talk | contribs) (→Overview) |
Mark Bridger (talk | contribs) (→Overview) |
||
| Line 14: | Line 14: | ||
Below is a table outlining the changes. Note: | Below is a table outlining the changes. Note: | ||
| − | * | + | * You can enable the new setting called '''Enable New Variable Syntax''' by navigating to '''Global Settings''' > '''System''' tab. Both the old and new syntaxes can be used concurrently if both are enabled. |
| − | |||
{| class="wikitable" | {| class="wikitable" | ||
Latest revision as of 15:39, 9 January 2026
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:
- You can enable the new setting called Enable New Variable Syntax by navigating to Global Settings > System tab. Both the old and new syntaxes can be used concurrently if both are enabled.
| 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.[# … #]}}
|