Reputation: 131
The directory structure for bundles specifies that views should be stored in <your-bundle>/Resources/views
. But then the best practices for template locations says that, actually, I should store them in app/Resources/views
. I can see the conveniences of doing the latter, but I don't understand:
index.html.twig
is easier to write than AcmeDemoBundle::index.html.twig
, but what if I also have FooBundle::index.html.twig
? I still need a way to specify which index.html.twig
I want, right?Upvotes: 1
Views: 168
Reputation: 2698
The documentation is correct. Store reusable bundle's templates in <your-bundle>/Resources/views
and your project's templates in app/Resources/views
. There is no conflict.
If you decide to create a bundle make sure it can be reused (that's the main purpose of the bundle). Otherwise keep using your AppBundle. AppBundle will not have two /index.html.twig
's.
Upvotes: 1