File tree 2 files changed +7
-7
lines changed 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ Override the Templates Directory
94
94
--------------------------------
95
95
96
96
If your templates are not stored in the default ``app/Resources/views/ ``
97
- directory, use the :ref: `twig.paths <config-twig-paths >` configuration option to
98
- define your own templates directory (or directories):
97
+ directory, use the :ref: `twig.default_path <config-twig-default-path >` configuration option to
98
+ define your own templates directory (use :ref: ` twig.paths < config-twig-paths >` for multiple directories):
99
99
100
100
.. configuration-block ::
101
101
@@ -104,7 +104,7 @@ define your own templates directory (or directories):
104
104
# app/config/config.yml
105
105
twig :
106
106
# ...
107
- paths : [ "%kernel.project_dir%/templates"]
107
+ default_path : " %kernel.project_dir%/templates"
108
108
109
109
.. code-block :: xml
110
110
@@ -119,7 +119,7 @@ define your own templates directory (or directories):
119
119
https://symfony.com/schema/dic/twig/twig-1.0.xsd" >
120
120
121
121
<twig : config >
122
- <twig : path >%kernel.project_dir%/templates</twig : path >
122
+ <twig : default- path >%kernel.project_dir%/templates</twig : default- path >
123
123
</twig : config >
124
124
125
125
</container >
@@ -128,9 +128,7 @@ define your own templates directory (or directories):
128
128
129
129
// app/config/config.php
130
130
$container->loadFromExtension('twig', [
131
- 'paths' => [
132
- '%kernel.project_dir%/templates',
133
- ],
131
+ 'default_path' => '%kernel.project_dir%/templates',
134
132
]);
135
133
136
134
.. _override-web-dir :
Original file line number Diff line number Diff line change @@ -243,6 +243,8 @@ on. Set it to ``0`` to disable all the optimizations. You can even enable or
243
243
disable these optimizations selectively, as explained in the Twig documentation
244
244
about `the optimizer extension `_.
245
245
246
+ .. _config-twig-default-path :
247
+
246
248
``default_path ``
247
249
~~~~~~~~~~~~~~~~
248
250
You can’t perform that action at this time.
0 commit comments