> For the complete documentation index, see [llms.txt](https://readme.directual.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://readme.directual.com/template-system/basics-of-template-system.md).

# Templating Principles

This is the Directual syntax for dealing with object fields 📜

To work with data in scenarios and filters, you can use Templating. Directual's Templating system is based on the [{{ mustache }}](https://mustache.github.io/) library, with some useful add-ons to the basic technology.

{% embed url="<https://youtu.be/4hXx31OtOWc>" %}
Interface in the video is a legacy edition one
{% endembed %}

## Basic templating principle

To use the value of a field, we type its system name in double curly braces: `{{field_system_name}}`. To fetch the property value of a linked object, type the field-link followed by a *dot* and the system name of the linked object `{{field_type_of_link.linked_object_field}}`.&#x20;

### Inputs for templating

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

{% embed url="<https://youtu.be/Czbul4tuG-M>" %}

![](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-MU2muAocclnJd9Vy7T0%2F-MU2pvLJVAs8fCOWOjVp%2Fselect.jpg?alt=media\&token=d31599bb-641d-49e1-af86-e19c1639dcf4)

{% hint style="info" %}
Note, that you can nest fields of linked objects like `{{book_author.name}}`,  where '`book_author'` is a field type of **link**. However, this doesn't work for **arrayLinks**! To work with arrayLink fields, use the [Link scenario step](/scenarios/editing-scenarios/system-steps/link-scenario-step.md).
{% endhint %}

The second is a **text area** field. This field has an option to evaluate [value as a JavaScript expression](/template-system/evaluating-as-js-expression.md) (**coding mode**).&#x20;

This field also has a **smart field inputs** option. When it's ON, you can choose fields directly in the text, and typing "{{" will activate the smart inline select. Turn it off if needed.

![](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-MU3wrSVu3bb0xgnYzs7%2F-MU3x32ngbeWPYBrQFiA%2Fexample.gif?alt=media\&token=112ccf47-1e59-4679-a4b4-95d5e4562cb4)

![Text area input with smart input fields](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-MU2muAocclnJd9Vy7T0%2F-MU2spkyv_5OwMquKD5T%2Ftextarea.jpg?alt=media\&token=4f17e064-ecd8-4721-afa6-9482208cf3d6)

![Text area input field without smart fields](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-MU2muAocclnJd9Vy7T0%2F-MU2t-8nTJHq2vk1KI-x%2Ftextarea2.jpg?alt=media\&token=2ededd1b-2a58-46e4-91a9-9cbdd47a6498)

![Text area input field with smart fields and evaluating JS](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-MU2muAocclnJd9Vy7T0%2F-MU2tAxX9JGZWy1rmkVG%2Ftextarea3.jpg?alt=media\&token=3799d555-a585-4577-9f69-f8959625aed7)

{% hint style="info" %}
Use [expression testing](/scenarios/testing-and-debugging.md#testing-option-1-checking-the-expression) to check the result of templating.
{% endhint %}
