-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Explain how to override the default templates directory #7844
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about mentioning the root dir here? Either via a note or %kernel.root_dir%/Resources/views/
instead of app/Resources/views/
. This will be one of the things people will forget to change once they move their kernel to src/
. People already are in the process of doing so now that the structure for 4.0 has been presented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about mentioning the root dir here? Either via a note or %kernel.root_dir%/Resources/views/ instead of app/Resources/views/.
I agree we should explicit it at some point but I don 't think this is the right place to do so, since other resources are concerned (i.e translations).
The whole Resources
folder should be relative to the kernel root dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
👍 |
Thank you Javier. |
* 2.7: [#7844] add XML and PHP config examples Property access fix remaining setDefinition() call mention old way to create PHPUnit mock objects Explain how to override the default templates directory Added a new article about linting translation files Removed any reference to X-Status-Code
* 2.8: [#7844] add XML and PHP config examples Property access fix remaining setDefinition() call mention old way to create PHPUnit mock objects Explain how to override the default templates directory Added a new article about linting translation files Removed any reference to X-Status-Code
* 3.2: Documented the getIterator() method [#7844] add XML and PHP config examples Property access fix remaining setDefinition() call mention old way to create PHPUnit mock objects Explain how to override the default templates directory Added a new article about linting translation files Removed any reference to X-Status-Code
* origin/2.7: (51 commits) Avoid backticks in shell scripts Update optional_dependencies.rst Fix xml blocks [#7875] minor tweaks Minor fix Minor changes [#7773] fix line length Add helpful remarks on custom DataCollector Remove use of deprecated security.exception_listener.class parameter Update resources.rst Fix incoherent ut8mb4 collation in Doctrine setup Fix decorating service definition fix empty XML element [#7873] add missing toctree entries Reworded the introduction of the contributing docs [#7844] add XML and PHP config examples Property access [HttpFoundation] Fix clearstatcache first arg Explain how to provide a stack trace fix remaining setDefinition() call ...
This fixes #4714.