Lines Matching refs:block
18 .. code-block:: jinja
22 {% block title %}{% endblock %}
23 {% block content %}{% endblock %}
28 .. code-block:: jinja
34 {% block title %}{% endblock %}
35 {% block content %}{% endblock %}
40 .. code-block:: jinja
44 {% block sidebar %}{% endblock %}
46 In this example, the ``use`` statement imports the ``sidebar`` block into the
50 .. code-block:: jinja
54 {% block sidebar %}{% endblock %}
55 {% block title %}{% endblock %}
56 {% block content %}{% endblock %}
69 The main template can also override any imported block. If the template
70 already defines the ``sidebar`` block, then the one defined in ``blocks.html``
73 .. code-block:: jinja
79 {% block sidebar %}{% endblock %}
80 {% block title %}{% endblock %}
81 {% block content %}{% endblock %}
87 tree, so it can be used when overriding a block defined in an imported
90 .. code-block:: jinja
96 {% block sidebar %}
100 {% block title %}{% endblock %}
101 {% block content %}{% endblock %}
103 In this example, ``parent()`` will correctly call the ``sidebar`` block from
109 "parent" block:
111 .. code-block:: jinja
117 {% block sidebar %}
118 {{ block('parent_sidebar') }}
124 If two imported templates define the same block, the latest one wins.