Rule Formatting
How to Use Scripting or Placeholders to Control the Output of Rules
This Page Explains the Rule Formatting System in Detail.
To gain an understanding of the rule system, read the following page:
RulesIntroduction
Rule formatting is used to format your custom payloads in rule actions, for example, when you use email actions and you want to use certain values from the event that's inside the email subject or body.
To gain an understanding of what can be done with the rule system let's have a look at an event.
The example below is a full content event that has been triggered following creation of a new item:
Formatting Options
The rule formatter grants access to all of this event's properties.
At the moment, there are three options for formatting:
SimpleScriptLiquidThe syntax is selected based on the value of the rule property.
If a value follows the format
Liquid(<Template>)
, thenTemplate
is interpreted as a liquid syntax. It is interpreted using a template engine.If a value follows the format
Script(<Script>)
, thenScript
is interpreted as Javascript expression and interpreted using a scripting engine.If none of the syntaxes above are detected, the value is interpreted as simple formatting. Therefore, it is interpreted using a built-in solution.
In newer versions of Squidex, the user interface has been improved and custom input fields have been introduced which allows you to select the syntax and automatically add the necessary prefix.
The liquid syntax is the most powerful and easiest option, which is why it is recommended for most user cases.
Last updated