File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 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
9494--------------------------------
9595
9696If 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):
9999
100100.. configuration-block ::
101101
@@ -104,7 +104,7 @@ define your own templates directory (or directories):
104104 # app/config/config.yml
105105 twig :
106106 # ...
107- paths : [ "%kernel.project_dir%/templates"]
107+ default_path : " %kernel.project_dir%/templates"
108108
109109 .. code-block :: xml
110110
@@ -119,7 +119,7 @@ define your own templates directory (or directories):
119119 https://symfony.com/schema/dic/twig/twig-1.0.xsd" >
120120
121121 <twig : config >
122- <twig : path >%kernel.project_dir%/templates</twig : path >
122+ <twig : default- path >%kernel.project_dir%/templates</twig : default- path >
123123 </twig : config >
124124
125125 </container >
@@ -128,9 +128,7 @@ define your own templates directory (or directories):
128128
129129 // app/config/config.php
130130 $container->loadFromExtension('twig', [
131- 'paths' => [
132- '%kernel.project_dir%/templates',
133- ],
131+ 'default_path' => '%kernel.project_dir%/templates',
134132 ]);
135133
136134 .. _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
243243disable these optimizations selectively, as explained in the Twig documentation
244244about `the optimizer extension `_.
245245
246+ .. _config-twig-default-path :
247+
246248``default_path ``
247249~~~~~~~~~~~~~~~~
248250
You can’t perform that action at this time.
0 commit comments