File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ directory structure is:
15
15
│ ├─ cache/
16
16
│ ├─ config/
17
17
│ ├─ logs/
18
+ │ ├─ Resources/
19
+ │ │ └─ views/
18
20
│ └─ ...
19
21
├─ src/
20
22
│ └─ ...
@@ -80,6 +82,22 @@ method::
80
82
81
83
Here you have changed the location of the directory to ``app/{environment}/logs ``.
82
84
85
+ .. _override-templates-dir :
86
+
87
+ Override the Templates Directory
88
+ --------------------------------
89
+
90
+ If your templates are not stored in the default ``app/Resources/views/ ``
91
+ directory, use the :ref: `twig.paths <config-twig-paths >` configuration option to
92
+ define your own templates directory (or directories):
93
+
94
+ .. code-block :: yaml
95
+
96
+ # app/config/config.yml
97
+ twig :
98
+ # ...
99
+ paths : ["%kernel.root_dir%/../templates"]
100
+
83
101
.. _override-web-dir :
84
102
85
103
Override the ``web `` Directory
Original file line number Diff line number Diff line change @@ -246,6 +246,8 @@ on. Set it to ``0`` to disable all the optimizations. You can even enable or
246
246
disable these optimizations selectively, as explained in the Twig documentation
247
247
about `the optimizer extension `_.
248
248
249
+ .. _config-twig-paths :
250
+
249
251
paths
250
252
~~~~~
251
253
You can’t perform that action at this time.
0 commit comments