How to: Rename the View Tab on the User Profile in Drupal 6

Michael Phipps's picture

I am assuming you know how to create a module.

To change the View Tab in a Drupal 6 User Profile:


function MODULENAME_menu_alter(&$items) {
$items['user/%user/view']['title'] = 'Summary';
}

To change the Edit tab in a Drupal 6 User Profile
NOTE the change from %user to %user_category. I wasted hours because of this small difference.


function MODULENAME_menu_alter(&$items) {
$items['user/%user_category/edit']['title'] = 'Your Details';
}

And just to clarify, you can do both of these at the same time...


function MODULENAME_menu_alter(&$items) {
$items['user/%user_category/edit']['title'] = 'Your Details';
$items['user/%user/view']['title'] = 'Summary';
}

I hope it saves you a few hours of searching

© 2010 Your Name.. Drupal theme by Kiwi Themes.