Skip to content

Commit cf952da

Browse files
cordovalweaverryan
authored andcommitted
clarification difference between function and tag includes
1 parent cac7c2e commit cf952da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

book/templating.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,10 @@ Including this template from any other template is simple:
561561

562562
The template is included using the ``{{ include() }}`` function. Notice that the
563563
template name follows the same typical convention. The ``articleDetails.html.twig``
564-
template uses an ``article`` variable. This is passed in by the ``list.html.twig``
565-
template using the ``with`` command.
564+
template uses an ``article`` variable. This could be passed in by the ``list.html.twig``
565+
template using the ``with`` command supported on a twig ``include`` tag. In this
566+
case however, we opt to use the twig ``include`` function which passes context automatically
567+
and passes also optional hashes.
566568

567569
.. tip::
568570

0 commit comments

Comments
 (0)