This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Override login & register

Override login & register

Override login & register

Thursday 21 August 2014 11:28:13 am - 2 replies


I'm working on the release 2014.07, and I have a little problem for overloading some templates.

 For my own classes, I dont't have problems but I can't find the trick to the registration page and the login page.

I don't know which matcher I have to use (


And another question: In my routing.yml, I have this:

    path:   /login
    defaults:  { _controller: }

Do I need to declare a route for "/user/register" ?

Thank you to those who took the time to read the post.

Thursday 21 August 2014 1:57:36 pm

On this post =>

It's explain that only the login view of the user module has been moved to new stack.

So to override the register template and the forgot password page, we must work in legacy mode.


How can I specify in my back office that my default template is the one I use in the front (bundle: folder: layout.html.twig)
This is not possible in my opinion but surely I'm wrong!
What is the best way to override these pages (login, forgotten password and registration) without coding features. I would like to keep the logic of ezpublish.

Modified on Thursday 21 August 2014 2:36:54 pm by Stabilo Boss

Tuesday 02 September 2014 4:19:45 pm


first, like you said , only the /login is moved to the new stack. All other route have a legacy fallback.

So, i cant understand why you need to specify the default template in the backoffice? you will only need to set the layout file in the parameters.yml. There are no need to make this specification in the backoffice. Dont forget that the frontend is the new stack. Backoffice is always legacy. 

you can override the standard template in your extension(legacy) in extension/YOUR-EXT/design/YOUR-DESIGN/templates/user. here you can copy/paste the original tpl and make your changes.

PS: Dont wory about the CSS, this will be able from the symfony stack. But you will have to create the legacy module template (pagelayout_legacy.html.twig) e.g:

 {% extends "YOURNAMEBundle::pagelayout.html.twig" %}
{{ module_result.content|raw }}

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from