Issue
What is the best place to keep your TWIG template and why?
app/Resources/views folder
or
YourBundle/Resources/views
Solution
Traditionally, Symfony developers stored the application templates in the Resources/views/ directory of each bundle. Then they used the logical name to refer to them (e.g. AcmeDemoBundle:Default:index.html.twig).
But for the templates used in your application, it's much more convenient to store them in the app/Resources/views/ directory. Syfmony Documentation
- In Symfony 2, auto generated twig files were located in
YourBundle/Resources/views
- In Symfony 3, auto generated twig files are located in
app/Resources/views
Answered By - niyasc Answer Checked By - Mary Flores (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.