You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
359 B
15 lines
359 B
``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>`
|
|
|