I want to override the login page using panels. I found a tutorial that shows me how to do it using Panels Everywhere, but that overrides the whole page (with site_template
). I just want to override the page content.
Is this possible?
I want to override the login page using panels. I found a tutorial that shows me how to do it using Panels Everywhere, but that overrides the whole page (with site_template
). I just want to override the page content.
Is this possible?
You can override existing paths with the Page Manager Existing Pages Module.
I have not used it with a login page but it works well for other cases. You can use it to override an existing page's path and then add the original content for that path as a panels pane alongside your custom additions.
It's not impossible to do what you want, but it's close. I wont go into the details of how to code it, but will explain what needs to be done.
The main problem is that panels can't override existing paths.
One solution would be to unset the user/login
path with hook_menu_alter
and then create a panels page for that path. Step two would be to create the login form as a content pane. If this works, it would be the most simple solution, but this is also the most fragile solution.
The other solution would be to use hook_menu_alter
to alter the callback and with panels APIs render a panel page. This is quite tricky, and I wont go into the details, but an example of this can be seen in the Commerce Panels Integration sandbox module. It does this, only in a more complex case, for the commerce checkout progress. You would also need to create the user login form as a content pane in this solution.
I've tried using the concept in Commerce Panels Integration but found that there were some bugs when doing AJAX stuff. So none of these solutions might be ideal, it depends a bit on what you need on the panels page you are creating.
For those who do not want to want to read the entire issue https://www.drupal.org/node/807754
It is suggested to use the following module: User Pages.
The User Pages module allows you to manage following user related pages:
- user
- user/login
- user/register
- user/password
By, default these user page are not available in Chaos Tool Suite. Once you install it, pages will be automatically available in Page Manager and can be managed via Panels.