This package is a part of the Symfony2 Admin Generator based on YAML configuration and Twig templating. But could also work standalone.
It will allow you to associate to the FOSUserBundle a base layout configured throw a config in the config.yml
git submodule add https://github.com/symfony2admingenerator/AdmingeneratorUserBundle vendor/Admingenerator/UserBundle
Follow the bundle documentation : https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md
$loader->registerNamespaces(array(
'FOS' => __DIR__.'/../vendor/bundles',
'Admingenerator' => __DIR__.'/../vendor/bundles',
$bundles = array(
// ....
new Admingenerator\UserBundle\AdmingeneratorUserBundle(),
In config.yml
admingenerator_user:
login_template: AdmingeneratorGeneratorBundle::base_login.html.twig
{% extends_my_configured_layout 'admingenerator.user_login_template' %}
Will be the same as :
{% extends 'The value of the container paramater admingenerator.user_login_template' %}