@@ -98,8 +98,9 @@ Override the Templates Directory
9898--------------------------------
9999
100100If your templates are not stored in the default ``templates/ `` directory, use
101- the :ref: `twig.paths <config-twig-paths >` configuration option to define your
102- own templates directory (or directories):
101+ the :ref: `twig.default_path <config-twig-default-path >` configuration
102+ option to define your own templates directory (use :ref: `twig.paths <config-twig-paths >`
103+ for multiple directories):
103104
104105.. configuration-block ::
105106
@@ -108,7 +109,7 @@ own templates directory (or directories):
108109 # config/packages/twig.yaml
109110 twig :
110111 # ...
111- paths : [ "%kernel.project_dir%/resources/views"]
112+ default_path : " %kernel.project_dir%// resources/views"
112113
113114 .. code-block :: xml
114115
@@ -123,7 +124,7 @@ own templates directory (or directories):
123124 https://symfony.com/schema/dic/twig/twig-1.0.xsd" >
124125
125126 <twig : config >
126- <twig : path >%kernel.project_dir%/resources/views</twig : path >
127+ <twig : default- path >%kernel.project_dir%/resources/views</twig : default- path >
127128 </twig : config >
128129
129130 </container >
@@ -132,9 +133,7 @@ own templates directory (or directories):
132133
133134 // config/packages/twig.php
134135 $container->loadFromExtension('twig', [
135- 'paths' => [
136- '%kernel.project_dir%/resources/views',
137- ],
136+ 'default_path' => '%kernel.project_dir%/resources/views',
138137 ]);
139138
140139 Override the Translations Directory
0 commit comments