Principles of templating

This is the Directual syntax for dealing with object fields πŸ“œ

For dealing with data in scenarios and filters you can use Templating. Directual Templating system is based on {{ mustache }} library. But there are some useful add-ons to the basic technology.

Interface in the video is a legacy edition one

Basic templating principle

For using the value of the field we are typing its system name in double curly braces: {{field_system_name}}. If we want to fetch the property value of the linked object, we type the field-link, then dot, then the system name of the linked object: {{field_type_of_link.linked_object_field}}.

Inputs for templating

There are two types of input fields for templating. The first is a smart select:

Note, that you can nest the fields of linked objects like {{book_author.name}}, where book_author is a field type of link. This doesn't work for arrayLinks! To deal with arrayLink fields you may apply Link scenario step.

The second is a text area field. This field has an option to evaluate value as a JavaScript expression (coding mode).

This field also has a smart field inputs option. If it is ON, you'll be able to choose the fields right in text, plus typing "{{" will lead to appearing of that smart inline select. Turn it OFF in case of a need.

Text area input with smart input fields
Text area input field without smart fields
Text area input field with smart fields and evaluating JS

Use expression testing to check the result of templating!