]> git.immae.eu Git - github/wallabag/wallabag.git/blame - vendor/twig/twig/doc/functions/block.rst
gitignore vendor
[github/wallabag/wallabag.git] / vendor / twig / twig / doc / functions / block.rst
CommitLineData
4f5b44bd
NL
1``block``
2=========
3
4When a template uses inheritance and if you want to print a block multiple
5times, use the ``block`` function:
6
7.. code-block:: jinja
8
9 <title>{% block title %}{% endblock %}</title>
10
11 <h1>{{ block('title') }}</h1>
12
13 {% block body %}{% endblock %}
14
15.. seealso:: :doc:`extends<../tags/extends>`, :doc:`parent<../functions/parent>`