File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,31 @@ Template files should live in the ``Resources/views`` directory of whatever dire
276
276
your *kernel * lives in. Since ``AppKernel `` lives in ``app/ ``, this template lives
277
277
at ``app/Resources/views/micro/random.html.twig ``.
278
278
279
+ .. code-block :: twig
280
+
281
+ {% extends 'base.html.twig' %}
282
+ {% block body %}
283
+ <p>{{ number }}</p>
284
+ {% endblock %}
285
+
286
+ You need also create base template ``app/Resources/views/base.html.twig ``.
287
+
288
+ .. code-block :: twig
289
+
290
+ <!DOCTYPE html>
291
+ <html>
292
+ <head>
293
+ <meta charset="UTF-8" />
294
+ <title>{% block title %}Welcome!{% endblock %}</title>
295
+ {% block stylesheets %}{% endblock %}
296
+ <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
297
+ </head>
298
+ <body>
299
+ {% block body %}{% endblock %}
300
+ {% block javascripts %}{% endblock %}
301
+ </body>
302
+ </html>
303
+
279
304
Finally, you need a front controller to boot and run the application. Create a
280
305
``web/index.php ``::
281
306
You can’t perform that action at this time.
0 commit comments