Theming the Drupal 6 registration, login, and request new password pages (NOT just forms)
I created this tutorial because I found a lack of documentation on how to make standalone pages for your login/registration/request password pages. By standalone, I mean have these pages look totally different than the rest of your site. All the tuts I came across claimed to theme these pages, but they ended up theming just the forms themselves, or they tell you to make files that do not work with Drupal 6.
Requirements:
- Drupal 6.x
Files used:
- page.tpl.php
- page-user-register.tpl.php
- page-user-login.tpl.php
- page-user-password.tpl.php
I created this tutorial because I found a lack of documentation on how to make standalone pages for your login/registration/request password pages. By standalone, I mean have these pages look totally different than the rest of your site. All the tuts I came across claimed to theme these pages, but they ended up theming just the forms themselves, or they tell you to make files that do not work with Drupal 6.

STEP 1
Copy page.tpl.php three times.
Rename one copy to page-user-register.tpl.php
Rename the second copy to page-user-login.tpl.php
Rename the third copy to page-user-password.tpl.php
*page.tpl.php is located at yourtheme/page.tpl.php

STEP 2
Flush all caches
STEP 3
The default user login is at /user. For this, your new login page is at /user/login.
Your Request New Password page is at /user/password
Your Register Page is at /user/register
This is useful if you want to remove the three tabs from these pages.

STEP 4
Test your three new pages.
Open up page-user-register.tpl.php, page-user-login.tpl.php, page-user-password.tpl.php and Select All text and delete. Save the pages, but don't close them.
Now go to /user/login, /user/password, and /user/register. They should all be blank pages. This is good.
Now go back and undo the text deletes on those three pages. Save the files and close them. If you go back to those pages now, they will be back up.
STEP 5
Now start theming those three pages to your hearts content. Adjust the code in each file to represent how you want them to look. And respectively, change your css files to reflect. For instance, you can take out your footers, headers, sidebars, change background colors. Rename, delete, or add new divs to styling them if you choose.
Here are just a few sample pages for inspiration
Crazy Egg
Porn.com (adult content, but it is a beautiful registration page)
Vimeo
Wufoo





Comments
Thanks for the tutorial. It
Thanks for the tutorial.
It is just common sense when you think about it. Problem is, it just did not occur to me to do this.
Hi, thanks for this tut! i
Hi,
thanks for this tut!
i was trying to customize my registration page with the technic above but i doesn't work... i'm using a sub-theme of the zen theme.
Any idea?
Thx
Can you give me some more
Can you give me some more information please. Tell me where you are suck.
I was creating an empty
I was creating an empty page-user-register.tpl.php into my theme directory, and after clearing the theme registry, i see always the registration page instead of a blank page... i suppose it's a side effect of using a sub-theme of the zen theme, cause when i copy the same file in the zen theme i have my blank page...
While using a Zen sub theme,
While using a Zen sub theme, it looks like you will have to leave page-user-login.tpl.php, page-user-password.tpl.php, and page-user-register.tpl.php in the zen/zen/ folder. I tested it, and leaving those 3 files there will still work for your sub theme.
Hi, Picxelplay. This tutorial
Hi, Picxelplay.
This tutorial is simply great. I have been searching to customize my registration form in the whole past week. I was really tired. But finally you guys provided me this. Thank you very much for this tutorial.
I have one more issue, I want my registration form to be of multiple pages how can I achieve this. Any or all help is greatly appreciated.
Once again thank you very much.
Pradeep.
Hello Pradeep, Your
Hello Pradeep,
Your welcome:)
You can use the Content Profile module to modify the registration form to add more fields and such. You can also make different registration forms for different roles using the Profile Setup module. Both of these have registrations on one page though. You could also think about having your registration on 1 page, but break it up into sections. Theme them so they are distinguished.
Content Profile module
http://drupal.org/project/content_profile
Profile Setup module
http://drupal.org/project/profile_setup
Read this following blog post also
http://drupalsn.com/learn-drupal/drupal-questions/question-4436
You can create a multi page form, and use hook_form_alter for use as a registration page(s), but I personally have never worked on such an issue. I never had a need for it, or had a client want it, but it is something I would like to look into more. From what I have read on the topic so far, it seems like people run into problems. Here are a few articles I found:
http://www.appnovation.com/create-multiple-step-form-drupal-6
http://drupal.org/node/598064
What about the page where you
What about the page where you are brought to after clicking on the link in your email?
E.g., http://site.com/user/reset/$userid/$random-hash?
I can't find out how to create a template for this page. Also, I can't find out how to preprocess this in the theme's template.php. I tried this:
function my_theme_preprocess_user_pass_reset(&$vars) {$vars['form']['submit']['#value'] = "Lorem Ipsum";
$vars['rendered'] = drupal_render($vars['form']);
}
But doesn't work.
Thanks for the great tutorial!
Use page-user-reset.tpl.php.
Use page-user-reset.tpl.php. Just tested it on a fresh install of Acquia Drupal.
Thank you!
Thank you!
I'm using ninesixty theme. It
I'm using ninesixty theme. It didn't work for me.
I'm using ninesixty theme. I
I'm using ninesixty theme. I have the three page tpl files ready and flush the cache.
I noticed that the neither of the new template files are being used.
I just tested it with the 960
I just tested it with the 960 theme at http://drupal.org/project/ninesixty straight out of the box, and it worked just fine. Remember your login page is at /user/login, and not /user.
Great tutorial it is very
Great tutorial it is very helpful thanks for posting this information.
Hi, I've tried using this on
Hi,
I've tried using this on a copy of Garland theme, but not having much luck...
I've followed the steps correctly, but possibly it's the flush cache stage? I've been into performance and cleared the cache but still no joy. Is there something else I need to do at this point?
Thanks for your help
Shane
In fact - cancel my last
In fact - cancel my last comment just figured it out :-)
It was me being silly, I'd created the new pages in another directory - duh!
This is going to be cool - thanks for the tutorial!
Cheers
Shane
Hi, Sorry to bother you
Hi,
Sorry to bother you again, ok... I have possibly a more difficult task that I'm trying to do.
I have a main site i.e. site.co.uk then my drupal blog within a directory of the site site.co.uk/blog I want to keep the existing user pages in tact. i.e. site.co.uk/blog/user
But then from then main site I'm wanting to show a popup to a customised version of site.co.uk/blog/user/register
So I want the popup registration page to look different to the normal blog site registration, is that somehow achievable?
Regards
Shane
Sorry for the late reply
Sorry for the late reply Shane,
Does your main site use Drupal also? And if so, are they using the same codebase?
Post new comment