How to customize register/login pages
Customizing the "user account" title for register/login pages
Last modified: September 12, 2009 - 07:56
description
Did you ever want to customize the "user account" title that appears at the top of the user/register, user/password, and user/login pages, to better describe the task the user is currently performing?
If you want to customise the full page layout, click through to the Customising the login, registration and request password full page layout handbook page.
In page.tpl.php, in place of:
<h1 class="title"><?php print $title ?></h1>
Insert:
<h1 class="title">
<?php if (arg(0) == 'user' && arg(1) == 'register') : ?>
Create an Account
<?php elseif (arg(0) == 'user' && arg(1) == 'password') : ?>
Retrieve lost password
<?php elseif (arg(0) == 'user' && arg(1) == 'login') : ?>
User Login
<?php elseif (arg(0) == 'user') : ?>
User Account
<?php else : ?>
<?php print $title ?>
<?php endif ; ?>
</h1>And replace the text with whatever you wish. I'm sure there's a better way to write this code ;) but this works.
You can also do a small modification to test for user login:
<?php
if (arg(0) == 'user' && arg(1) == 'register') :
?>
Create an Account
<?php
if (arg(0) == 'user' && arg(1) == 'register') :
?>