5 Using ``block`` with the ``defined`` test was added in Twig 1.28.
8 Support for the template argument was added in Twig 1.28.
10 When a template uses inheritance and if you want to print a block multiple
11 times, use the ``block`` function:
15 <title>{% block title %}{% endblock %}</title>
17 <h1>{{ block('title') }}</h1>
19 {% block body %}{% endblock %}
21 The ``block`` function can also be used to display one block from another
26 {{ block("title", "common_blocks.twig") }}
28 Use the ``defined`` test to check if a block exists in the context of the
33 {% if block("footer") is defined %}
37 {% if block("footer", "common_blocks.twig") is defined %}
41 .. seealso:: :doc:`extends<../tags/extends>`, :doc:`parent<../functions/parent>`