How do I edit link tabs found on the default user profile page in drupal? I’m trying to avoid having to create a user_profile.tpl.php file and rebuild the entire profile from scratch. If there’s an easier way to do this, I’d rather do that. But, if I’m forced to create a custom template, how do I control the menu tabs for the profile? I haven’t found any documentation that explains that part yet.
Share
Edit
I didn’t catch that you wanted to do generic modification of the user profile tabs, not necessarily removing them. I’ve modified my code to provide a few different examples of how you can modify the tabs.
Edit 2
Removed the
user_access()check on the unset as it would only be checked during the menu rebuild. Addedaccess callbackexample instead.You can do this in a custom module with
hook_menu_alter()andunset():Each menu item is registered with Drupal using the
$itemsarray. After enabling this module, rebuild the cache and the tabs should be modified.