Variables

Variables in twig are displayed using double curly braces:

{{ var }} - {{ var.property }} - {{ array['key'] }}

When used in control structures, the synax is the same:

{% if var.property > 5 %}BIG{% endif %}

In any place that a variable can be be used, it can also be filtered. See the filtering section for which filters are available.

{{ var|filter('val') }}