FOSUserBundle: How to best integrate login and register form in one template? FOSUserBundle: How to best integrate login and register form in one template? symfony symfony

FOSUserBundle: How to best integrate login and register form in one template?


You could use (as @Sidali Hallak said)

{% render url('fos_user_registration_register') %}{% render url('fos_user_security_login') %}

But use your own versions of the FOSUserBundle:Registration:register.html.twig and FOSUserBundle:Security:login.html.twig templates that don't extend FOSUserBundle::layout.html.twig


To be compliant with newer Symfony versions, you should avoid using {% render %} tag and use {{ render(controller('MyBundle:ControllerClass:action')) }} instead:

    {{ render(controller('FOSUserBundle:Security:login')) }}    {{ render(controller('FOSUserBundle:Registration:register')) }}


use :

{% render url('fos_user_security_login') %}{% render url('fos_user_Registration_register') %}