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

Replace overriding twig.paths by twig.default_path#14135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
wouterj merged 1 commit intosymfony:3.4froml-vo:patch-12
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletionsconfiguration/override_dir_structure.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -94,8 +94,8 @@ Override the Templates Directory
--------------------------------

If your templates are not stored in the default ``app/Resources/views/``
directory, use the :ref:`twig.paths <config-twig-paths>` configuration option to
define your own templates directory (or directories):
directory, use the :ref:`twig.default_path <config-twig-default-path>` configuration option to
define your own templates directory (use :ref:`twig.paths <config-twig-paths>` for multiple directories):

.. configuration-block::

Expand All@@ -104,7 +104,7 @@ define your own templates directory (or directories):
# app/config/config.yml
twig:
# ...
paths: ["%kernel.project_dir%/templates"]
default_path:"%kernel.project_dir%/templates"

.. code-block:: xml

Expand All@@ -119,7 +119,7 @@ define your own templates directory (or directories):
https://symfony.com/schema/dic/twig/twig-1.0.xsd">

<twig:config>
<twig:path>%kernel.project_dir%/templates</twig:path>
<twig:default-path>%kernel.project_dir%/templates</twig:default-path>
</twig:config>

</container>
Expand All@@ -128,9 +128,7 @@ define your own templates directory (or directories):

// app/config/config.php
$container->loadFromExtension('twig', [
'paths' => [
'%kernel.project_dir%/templates',
],
'default_path' => '%kernel.project_dir%/templates',
]);

.. _override-web-dir:
Expand Down
2 changes: 2 additions & 0 deletionsreference/configuration/twig.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -243,6 +243,8 @@ on. Set it to ``0`` to disable all the optimizations. You can even enable or
disable these optimizations selectively, as explained in the Twig documentation
about `the optimizer extension`_.

.. _config-twig-default-path:

``default_path``
~~~~~~~~~~~~~~~~

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp