mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
fc016bd281
This reverts commit 1a2175fc49.
16 lines
359 B
ReStructuredText
16 lines
359 B
ReStructuredText
``block``
|
|
=========
|
|
|
|
When a template uses inheritance and if you want to print a block multiple
|
|
times, use the ``block`` function:
|
|
|
|
.. code-block:: jinja
|
|
|
|
<title>{% block title %}{% endblock %}</title>
|
|
|
|
<h1>{{ block('title') }}</h1>
|
|
|
|
{% block body %}{% endblock %}
|
|
|
|
.. seealso:: :doc:`extends<../tags/extends>`, :doc:`parent<../functions/parent>`
|