Hi there,
Currently the user/register user/password and user/login all show the same page title (the title at the top of the browser shows 'User Account | sitename'). I want to change this as the below:
user/register => Create account | Sitename
user/password => Forgot password | Sitename
user/login => Log in | Sitename
I was able to find the below code and tried putting it into template.php under function theme_preprocess_page(&$vars) but it didn't work.
Then I tried in a custom module under hook_init function but it didn't work.
drupal_set_title(t('Create new account'));
} elseif (arg(0) == 'user' && arg(1) == 'password') {
drupal_set_title(t('Request new password'));
} elseif (arg(0) == 'user' && arg(1) == 'login') {
drupal_set_title(t('Log in'));
} elseif (arg(0) == 'user' && arg(1) == '') {
drupal_set_title(t('Log in'));
}
I'm trying to find the best way (performance wise) to correctly change the page title on these pages plus maybe other pages.
Would anyone be able to assist with this?
Thank you!
Read »








