Tweak previous merge

This commit is contained in:
Fabien Potencier
2026-06-19 08:06:30 +02:00
parent 4007231f2f
commit ec0f5d5dad
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -178,13 +178,13 @@ The ``embed`` tag takes the exact same arguments as the ``include`` tag:
{% set name = 'Fabien' %} {% set name = 'Fabien' %}
{# "name" is undefined inside the block #}
{% embed "base" only %} {% embed "base" only %}
{# "name" is undefined inside the block #}
{% block content %}{{ name }}{% endblock %} {% block content %}{{ name }}{% endblock %}
{% endembed %} {% endembed %}
{# "name" is passed explicitly and is available #}
{% embed "base" with {'name': name} only %} {% embed "base" with {'name': name} only %}
{# "name" is passed explicitly and is available #}
{% block content %}{{ name }}{% endblock %} {% block content %}{{ name }}{% endblock %}
{% endembed %} {% endembed %}
+3 -1
View File
@@ -111,4 +111,6 @@ of the templates exist, otherwise it will throw an exception.
.. seealso:: .. seealso::
:doc:`embed<../tags/embed>` allows you to include another template's contents like ``include``, but also allows you to override blocks defined inside the included template. :doc:`embed<../tags/embed>` allows you to include another template's
contents like ``include``, but also allows you to override blocks defined
inside the included template.