extends construct

The extends construct allows one to extend a given template redefining some of it's blocks. The concept of extending is very much associated with the concept of block detailed below. The extends construct expects one argument, a path for another Jtwig template.

{% extends pathExpression %}

Path

The path can be any expression that, once evaluated will then be used by the resource resolution mechanism in order to retrieve another Jtwig template. This resolution mechanism will be detailed futher on.

The extends template can then be followed by a sequence of set, block or import constructs only. For example:

{% extends pathExpression %}
{% import pathExpression as importAlias %}
{% set var = 1 %}
{% block ... %}{% endblock %}