> 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

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>" %}

![](/files/-MU2pvLJVAs8fCOWOjVp)

{% 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.

![](/files/-MU3x32ngbeWPYBrQFiA)

![Text area input with smart input fields](/files/-MU2spkyv_5OwMquKD5T)

![Text area input field without smart fields](/files/-MU2t-8nTJHq2vk1KI-x)

![Text area input field with smart fields and evaluating JS](/files/-MU2tAxX9JGZWy1rmkVG)

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