Skip to content

clarification difference between function and tag includes #2813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions book/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 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::

Expand Down