-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add default_path option reference #8549
Conversation
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.
Thanks for documenting this feature!
We'll need an additional comment explaining the difference between default_path
and paths
. Maybe it's as easy as removing the hardcoded templates/
dir in paths
option and replacing it with "the value of the "default_path" option".
I suggest to add in "path" option a list of the directories in the same order used by Symfony. Example:
This option defines the directories where Symfony will look for Twig templates
in addition to the default locations. Symfony looks for the templates in the
following order:
1. The directories defined in this option;
2. The ``src/Resources/views/`` directory of the application;
3. The directory defined in the ``default_path`` option;
4. The ``Resources/views/`` directories of the bundles used in the application.
Thanks @javiereguiluz, updated. |
@yceruto thanks! I have two more comments:
|
Fixed order.
Done. Thanks! |
However, there is other paths have not been mentioned here, such as:
Do you think we should add them too? |
Hmmm, I don’t think so. Let’s keep/add that info to wherever we talk about overriding bundles. And in that spot, we probably do need to update it for the new paths :). We could do that here or in another pr |
Agree, so I finished here :) |
Thank you @yceruto. |
This PR was merged into the 3.4 branch. Discussion ---------- Add default_path option reference symfony/symfony#24179 Commits ------- 66fd357 Minor tweaks af245fc Add default_path option reference
* 3.4: (27 commits) [#8549] update ordered list syntax Minor tweaks Add default_path option reference [Form] Add debug:form command to debug page Added option to disable type enforcement in serializer Explained the possibility of defining custom deprecation messages [config] Add a note about deprecated a node [#8471] minor reword Explained the DomCrawler charset guessing mechanism Added a bundle deprecation notice in other articles [#8497] fix typo Updated Guard article for the GuardAuthenticatorInterface deprecation Deprecate auto picking the first provider Explain the new ColorType a bit more Explain the new TelType a bit more add doc for new tel and color types Update tags.rst Update tags.rst Update tags.rst Update tags.rst ...
symfony/symfony#24179