Lines Matching refs:include
1 ``include``
4 The ``include`` statement includes a template and returns the rendered content
9 {% include 'header.html' %}
11 {% include 'footer.html' %}
16 :doc:`include<../functions/include>` function instead as it provides the
19 * The ``include`` function is semantically more "correct" (including a
24 the ``include`` function:
28 {% set content %}{% include 'template.html' %}{% endset %}
32 {% set content = include('template.html') %}
34 * The ``include`` function does not impose any specific order for
47 {% include 'template.html' with {'foo': 'bar'} %}
50 {% include 'template.html' with vars %}
57 {% include 'template.html' with {'foo': 'bar'} only %}
62 {% include 'template.html' only %}
74 {% include some_var %}
75 {% include ajax ? 'ajax.html' : 'not_ajax.html' %}
80 // {% include template %}
93 You can mark an include with ``ignore missing`` in which case Twig will ignore
99 {% include 'sidebar.html' ignore missing %}
100 {% include 'sidebar.html' ignore missing with {'foo': 'bar'} %}
101 {% include 'sidebar.html' ignore missing only %}
111 {% include ['page_detailed.html', 'page.html'] %}