smichaelsen
smichaelsen

Reputation: 168

Symfony folder structure doesn't fit to docs/tutorials with symfony/website-skeleton

I have a beginner question regarding folder structure: I started a new project based on symfony/website-skeleton. I don't know wether it's due to this package or if things in symfony have changed recently, but I have a different folder structure than in all the docs and tutorials.

My PHP code lives in /src my templates live in /templates. Now the Tutorial of FOSUserBundle tells me I can override bundle templates by creating the folder /app/Resources/FOSUserBundle/views, but I don't have an /app folder.

Where would I achieve this with my structure? Or should I somehow restructure my project to get back the /app folder?

enter image description here

Upvotes: 0

Views: 322

Answers (1)

smichaelsen
smichaelsen

Reputation: 168

I found the answer by digging more into the documentation: http://symfony.com/doc/current/templating/overriding.html

The correct way to override bundle template with this folder structure is: templates/bundles/{BUNDLE_NAME}/{PATH/TO/TEMPLATE.html.twig}

So in my case: templates/bundles/FOSUserBundle/layout.html.twig

Upvotes: 2

Related Questions