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

Override login & register

Override login & register

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

Hello,

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 (https://doc.ez.no/display/EZP/View+provider+configuration)

 

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

 login:
    path:   /login
    defaults:  { _controller: ezpublish.security.controller:loginAction }

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 => http://share.ez.no/forums/ez-publish-5-platform/override-register-template#comment83046

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

HI,

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 }}
expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from