use

See also

fragment and useblock.

Render a named fragment.

The use tag renders a fragment that was defined with the fragment tag.

Example:

{% fragment answer_row %}
    <div class="row">
        <label>{{ label }}</label>
        <span>{{ value }}</span>
    </div>
{% endfragment %}

{% use answer_row label="Email" value=user.email %}

Note

Like the include tag, the with keyword is optional:

{% use answer_row label="Email" value=user.email %}
{% use answer_row with label="Phone" value=user.phone %}

The fragment is rendered with the current template context, extended with the supplied arguments.