Files
wallabag/vendor/twig/twig/doc/functions/block.rst
Nicolas Lœuillet 4f5b44bd3b twig implementation
2013-08-03 19:26:54 +02:00

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>`