Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cf952da

Browse filesBrowse files
cordovalweaverryan
authored andcommitted
clarification difference between function and tag includes
1 parent cac7c2e commit cf952da
Copy full SHA for cf952da

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎book/templating.rst

Copy file name to clipboardExpand all lines: book/templating.rst
+4-2Lines changed: 4 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.