mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-17 07:50:50 +00:00
Tweak previous merge
This commit is contained in:
+2
-2
@@ -178,13 +178,13 @@ The ``embed`` tag takes the exact same arguments as the ``include`` tag:
|
||||
|
||||
{% set name = 'Fabien' %}
|
||||
|
||||
{# "name" is undefined inside the block #}
|
||||
{% embed "base" only %}
|
||||
{# "name" is undefined inside the block #}
|
||||
{% block content %}{{ name }}{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
{# "name" is passed explicitly and is available #}
|
||||
{% embed "base" with {'name': name} only %}
|
||||
{# "name" is passed explicitly and is available #}
|
||||
{% block content %}{{ name }}{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
|
||||
@@ -111,4 +111,6 @@ of the templates exist, otherwise it will throw an exception.
|
||||
|
||||
.. 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.
|
||||
|
||||
Reference in New Issue
Block a user