FOSUserBundle customization notes

 

I’ve been busy creating a new project in which I use symfony2 for the first time. Working with symfony1.x for nearly 3 years I really like some of the ideas of symfony2. However there are also some things I dislike, or just don’t fully understand yet.

Here are some quick notes I took while reading the FOSBundle Documentation.

 


Default Templates

The easy and quick way:

  • Basically override the FOS Template by creating a file under ‘./app/Resources/FOSUserBundle/views/layout.html.twig’
  • Be sure to include this block, which will hold the FOSUserBundle Content.¬†
{% block fos_user_content %}
{% endblock fos_user_content %}

2. The more complicated way