Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2bfba9b

Browse files
committed
Replace overriding twig.paths by twig.default_path
1 parent6f27e88 commit2bfba9b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎configuration/override_dir_structure.rst‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Override the Templates Directory
9494
--------------------------------
9595

9696
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
97+
directory, use the:ref:`twig.default_path<config-twig-default-path>` configuration option to
9898
define your own templates directory (or directories):
9999

100100
..configuration-block::
@@ -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:

‎reference/configuration/twig.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ on. Set it to ``0`` to disable all the optimizations. You can even enable or
243243
disable these optimizations selectively, as explained in the Twig documentation
244244
about `the optimizer extension`_.
245245

246+
.. _config-twig-default-path:
247+
246248
``default_path``
247249
~~~~~~~~~~~~~~~~
248250

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp