I am trying to change the title on the User Account page (mysite.com/user).

I tried this, but it changes the title on all pages:

function mytheme_alpha_preprocess_page(&$vars) {
  // Hide the node title on the front page
  if($vars['user']) {
    $vars['title'] = 'My New Title';    
  }
}

Thanks in advance for any help! I am but a lowly designer and I really appreciate any help I can get from the awesome Drupal community!

Comments

Rosaria Constantin’s picture

Hi,
Try this, it works for me :

function mymodule_preprocess_page(&$vars, $hook) {
global $user;

	if(arg(0)=='user' && arg(1)==$user->uid){
		$vars['title']=t('My title'); 
				
	}
}
kaido.toomingas’s picture

Issue summary: View changes

(y)