Skip to content

Commit 0c272c3

Browse files
authored
Reword explanation
1 parent 1c25c7c commit 0c272c3

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

page_creation.rst

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -262,19 +262,7 @@ to get your *new* lucky number!
262262

263263
http://localhost:8000/lucky/number
264264

265-
Now you may wonder where the Web Debug Toolbar has gone: that's because we don't write
266-
a ``body`` element using the current template. If we incorporate the default
267-
``base.html.twig``, which contains all default elements, including ``body``, you'll see
268-
that the Toolbar re-appears:
269-
270-
.. code-block:: diff
271-
272-
{# templates/lucky/number.html.twig #}
273-
+ {% extends 'base.html.twig' %}
274-
275-
+ {% block body %}
276-
<h1>Your lucky number is {{ number }}</h1>
277-
+ {% endblock %}
265+
Now you may wonder where the Web Debug Toolbar has gone: that's because there is no ``</body>`` tag in the current template. You can add the body element yourself, or extend ``base.html.twig``, which contains all default HTML elements.
278266

279267
In the :doc:`/templating` article, you'll learn all about Twig: how to loop, render
280268
other templates and leverage its powerful layout inheritance system.

0 commit comments

Comments
 (0)