Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 8 down vote accepted
+25

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.