10000 minor #5548 use the include() Twig function instead of the tag (xabbuh) · symfony/symfony-docs@d8950b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit d8950b2

Browse files
committed
minor #5548 use the include() Twig function instead of the tag (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- use the include() Twig function instead of the tag | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | Commits ------- f0d4ea4 use the include() Twig function instead of the tag
2 parents 39b0542 + f0d4ea4 commit d8950b2

File tree

3 files changed

+11
-11
lines changed
8000

3 files changed

+11
-11
lines changed

book/templating.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,9 @@ you set `with_context`_ to false).
584584
maps (i.e. an array with named keys). If you needed to pass in multiple
585585
elements, it would look like this: ``{'foo': foo, 'bar': bar}``.
586586

587-
.. versionadded:: 2.2
587+
.. versionadded:: 2.3
588588
The `include() function`_ is a new Twig feature that's available in Symfony
589-
2.2. Prior, the `{% include %} tag`_ tag was used.
589+
2.3. Prior, the `{% include %} tag`_ tag was used.
590590

591591
.. index::
592592
single: Templating; Embedding action

cookbook/profiler/data_collector.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ following example can help you get started:
131131
</div>
132132
{% endset %}
133133
134-
{# Set the "link" value to false if you do not have a big "panel"
134+
{# Set the "link" value to false if you do not have a big "panel"
135135
section that you want to direct the user to. #}
136-
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': true } %}
136+
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
137137
138138
{% endblock %}
139139
140140
{% block head %}
141-
{# Optional, if you need your own JS or CSS files. #}
142-
{{ parent() }} {# Use parent() to keep the default styles #}
141+
{# Optional, if you need your own JS or CSS files. #}
142+
{{ parent() }} {# Use parent() to keep the default styles #}
143143
{% endblock %}
144144
145145
{% block menu %}
@@ -151,7 +151,7 @@ following example can help you get started:
151151
{% endblock %}
152152
153153
{% block panel %}
154-
{# Optional, for showing the most details. #}
154+
{# Optional, for showing the most details. #}
155155
<h2>Example</h2>
156156
<p>
157157
<em>Major information goes here</em>

cookbook/templating/namespaced_paths.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ Take the following paths as an example:
1818
.. code-block:: jinja
1919
2020
{% extends "AppBundle::layout.html.twig" %}
21-
{% include "AppBundle:Foo:bar.html.twig" %}
21+
{{ include('AppBundle:Foo:bar.html.twig') }}
2222
2323
With namespaced paths, the following works as well:
2424

2525
.. code-block:: jinja
2626
2727
{% extends "@App/layout.html.twig" %}
28-
{% include "@App/Foo/bar.html.twig" %}
28+
{{ include('@App/Foo/bar.html.twig') }}
2929
3030
Both paths are valid and functional by default in Symfony.
3131

@@ -80,7 +80,7 @@ called ``sidebar.twig`` in that directory, you can use it easily:
8080

8181
.. code-block:: jinja
8282
83-
{% include '@foo_bar/sidebar.twig' %}
83+
{{ include('@foo_bar/sidebar.twig') }}
8484
8585
Multiple Paths per Namespace
8686
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -134,4 +134,4 @@ in the previous three directories:
134134

135135
.. code-block:: jinja
136136
137-
{% include '@theme/header.twig' %}
137+
{{ include('@theme/header.twig') }}

0 commit comments

Comments
 (0)
0