Skip to content

Commit 6e4f084

Browse files
Minor reword
1 parent af6b4de commit 6e4f084

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

templating/debug.rst

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ for example, inside your controller::
3333
The output of the ``dump()`` function is then rendered in the web developer
3434
toolbar.
3535

36-
In a Twig template, two constructs are available for dumping a variable.
37-
Choosing between both is mostly a matter of personal taste, still:
36+
In a Twig template, you can use the ``dump`` utility as a function or a tag:
3837

3938
* ``{% dump foo.bar %}`` is the way to go when the original template output
4039
shall not be modified: variables are not dumped inline, but in the web
@@ -46,22 +45,13 @@ Choosing between both is mostly a matter of personal taste, still:
4645
.. code-block:: html+twig
4746

4847
{# app/Resources/views/article/recent_list.html.twig #}
48+
{# the contents of this variable are sent to the Web Debug Toolbar #}
4949
{% dump articles %}
5050

5151
{% for article in articles %}
52-
<a href="/article/{{ article.slug }}">
53-
{{ article.title }}
54-
</a>
55-
{% endfor %}
56-
57-
or
52+
{# the contents of this variable are display on the web page #}
53+
{{ dump(article) }}
5854

59-
.. code-block:: html+twig
60-
61-
{# app/Resources/views/article/recent_list.html.twig #}
62-
{{ dump(articles) }}
63-
64-
{% for article in articles %}
6555
<a href="/article/{{ article.slug }}">
6656
{{ article.title }}
6757
</a>

0 commit comments

Comments
 (0)