1
votes

I've just installed FOSUserBundle and I'm trying to override the templates to use my own custom layout.

I have a bundle, BMCmsBundle, that has a layout.html.twig file in

src/BM/CmsBundle/Resources/views/layout.html.twig

Looking through the docs, I have created the following file:

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

How do I then use my own template, i.e. CSS/jS? I've tried in the FOS layout.html.twig file to use the following:

{% extends 'BMCmsBundle::layout.html.twig' %}

But once again, this doesn't seem to work, any ideas why?

Thanks

2

2 Answers

4
votes

After creating your new layout at

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

Make sure you also clear your cache:

 php app/console cache:clear
0
votes

It is the opposite.

Your layout in BMCmsBundle has to extend the one in app/Resources with the command :

{% extends "::layout.html.twig" %}