home

Browse documentation

ezyVet Knowledge Center

Get access to documentation, training, and other high-quality resources.

About Twig template variables

Twig template variables put data from your ezyVet site in a document template. You can use Twig template variables in templates for printed documents and PDF documents.

When you print a document, ezyVet replaces each Twig template variable with data from your ezyVet site. For example, a variable can show the name of the client or the total of an invoice.

With Twig code, a document can also show a text only when a condition is true. And a document can show the same text for each item in a list of records or values.

How to use Twig template variables

To use Twig template variables in a document template, select Use New Templating Engine in the settings of the template. For more information, refer to Configure a document template to use the Twig template system.

The template editor does not show the {% %} tags of Twig. To see or change these tags, select the horizontal ellipsis ( ⋯ ), then select Source code.

Note: You cannot use Twig template variables in email templates. Email templates always use the classic template system, also when Use New Templating Engine is selected.

A Twig template shows data from the record that you print it from. If you print the template from a different type of record, some variables can show no value. For a clinical document that you print from different types of records, a template that uses the classic template system can be better.