This bundle is prepared for a flawless integration with FOSUserBundle, but its not coming out-of-the-box.
First follow the installation instruction for the FOSUserBundle and configure it to your needs.
Then integrate it with the AdminLTEBundle as follows.
admin_lte:
routes:
adminlte_login: fos_user_security_login
adminlte_login_check: fos_user_security_check
adminlte_registration: fos_user_registration_register
adminlte_password_reset: fos_user_resetting_request
If you don't want the "password reset" and/or "register account" functionality,
simply remove the configuration keys adminlte_password_reset
and adminlte_registration
.
Create the directory templates/bundles/FOSUserBundle/
with the following directory structure and files:
templates/bundles
└── FOSUserBundle
├── Registration
│ ├── confirmed.html.twig
│ └── register.html.twig
├── Resetting
│ └── request.html.twig
├── Security
│ └── login.html.twig
└── layout.html.twig
Now create the files with the following content:
{% extends '@AdminLTE/FOSUserBundle/Registration/confirmed.html.twig' %}
{% extends '@AdminLTE/FOSUserBundle/Registration/register.html.twig' %}
{% extends '@AdminLTE/FOSUserBundle/Resetting/request.html.twig' %}
{% extends '@AdminLTE/FOSUserBundle/Security/login.html.twig' %}
{% extends '@AdminLTE/FOSUserBundle/layout.html.twig' %}
You might want to overwrite the block logo_login
in each file to display your app name like this:
{% block logo_login %}<b>Demo</b><br>Application{% endblock %}
You can have a look at the files in the demo application to get a first idea.