@@ -65,6 +65,9 @@ TwigBundle Configuration ("twig")
65
65
decimal_point : ' ,'
66
66
thousands_separator : ' .'
67
67
68
+ # The following was added in Symfony 3.4.
69
+ default_path : ' %kernel.project_dir%/templates'
70
+
68
71
.. code-block :: xml
69
72
70
73
<!-- app/config/config.xml -->
@@ -85,6 +88,7 @@ TwigBundle Configuration ("twig")
85
88
debug =" %kernel.debug%"
86
89
strict-variables =" false"
87
90
optimizations =" true"
91
+ default-path =" %kernel.project_dir%/templates"
88
92
>
89
93
<twig : form-theme >form_div_layout.html.twig</twig : form-theme > <!-- Default -->
90
94
<twig : form-theme >form.html.twig</twig : form-theme >
@@ -134,6 +138,7 @@ TwigBundle Configuration ("twig")
134
138
'decimal_point' => ',',
135
139
'thousands_separator' => '.',
136
140
),
141
+ 'default_path' => '%kernel.project_dir%/templates',
137
142
));
138
143
139
144
.. caution ::
@@ -336,6 +341,13 @@ on. Set it to ``0`` to disable all the optimizations. You can even enable or
336
341
disable these optimizations selectively, as explained in the Twig documentation
337
342
about `the optimizer extension `_.
338
343
344
+ default_path
345
+ ~~~~~~~~~~~~
346
+
347
+ **type **: ``string `` **default **: ``'%kernel.project_dir%/templates' ``
348
+
349
+ The default directory where Symfony will look for Twig templates.
350
+
339
351
.. _config-twig-paths :
340
352
341
353
paths
@@ -344,9 +356,9 @@ paths
344
356
**type **: ``array `` **default **: ``null ``
345
357
346
358
This option defines the directories where Symfony will look for Twig templates
347
- in addition to the default locations (``app /Resources/views/ `` and the bundles'
348
- ``Resources/views/ `` directories). This is useful to integrate the templates
349
- included in some library or package used by your application.
359
+ in addition to the default locations (``src /Resources/views/ ``, `` templates/ ``
360
+ and the bundles ``Resources/views/ `` directories). This is useful to integrate
361
+ the templates included in some library or package used by your application.
350
362
351
363
The values of the ``paths `` option are defined as ``key: value `` pairs where the
352
364
``value `` part can be ``null ``. For example:
0 commit comments