From 378c73d8aee403edbed7533d62fcbdd251643985 Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Wed, 10 Jul 2013 01:00:36 -0500 Subject: [PATCH 1/2] clarification difference between function and tag includes --- book/templating.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/book/templating.rst b/book/templating.rst index 6590ae8410f..3fa5b2800f6 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -561,8 +561,10 @@ Including this template from any other template is simple: The template is included using the ``{{ include() }}`` function. Notice that the template name follows the same typical convention. The ``articleDetails.html.twig`` -template uses an ``article`` variable. This is passed in by the ``list.html.twig`` -template using the ``with`` command. +template uses an ``article`` variable. This could be passed in by the ``list.html.twig`` +template using the ``with`` command supported on a twig ``include`` tag. In this +case however, we opt to use the twig ``include`` function which passes context automatically +and passes also optional hashes. .. tip:: From 42814a9db769273eb3d672ac67f1867347aa82bc Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Wed, 10 Jul 2013 08:23:39 -0500 Subject: [PATCH 2/2] update according to stofs comments --- book/templating.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/templating.rst b/book/templating.rst index 3fa5b2800f6..f2021846649 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -563,8 +563,8 @@ The template is included using the ``{{ include() }}`` function. Notice that the template name follows the same typical convention. The ``articleDetails.html.twig`` template uses an ``article`` variable. This could be passed in by the ``list.html.twig`` template using the ``with`` command supported on a twig ``include`` tag. In this -case however, we opt to use the twig ``include`` function which passes context automatically -and passes also optional hashes. +case however, we chose to use the twig ``include`` function which also passes context +by default and passes also optional hashes however without the need for a ``with`` keyword. .. tip::