asmista
asmista

Reputation: 451

Symfony 2 Impossible to override template FOSUserBundle

I have implemented FOSUser in my project. And I overloaded the form successfully.

Only when I want to override the templates, it doesn't work. Yet I respect the views of FOSUser architechture.

Do you have an idea of ​​what can be a problem?

Upvotes: 2

Views: 3736

Answers (1)

Cyprian
Cyprian

Reputation: 11374

Take a look on documentation:

https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_templates.md

Basically there are two ways to achieve your goal. First - simpler, is just put new templates into your app/Resources, for example:

app/Resources/FOSUserBundle/views/Profile/layout.html.twig

The second way is:

(...) you can also create a bundle defined as child of FOSUserBundle and place the new template in the same location that is resides in the FOSUserBundle.

Upvotes: 7

Related Questions