In the user page (www.example.com/user), there are [View | Edit] tabs. Is it possible to hide the View tab and leave Edit tab there?

  • For which Drupal version are you asking? – Berdir May 11 '11 at 9:49

Use Tab Tamer, which allows you to move, hide and disable tabs on various pages.

Tab Tamer is an administration utility that provides easy re-ordering, hiding, and deactivation of tabs and subtabs. You can also rename tab labels.

| improve this answer | |

You could also just use hook_menu_local_tasks_alter() in D7:

function MYMODULE_menu_local_tasks_alter(&$data){
foreach ($data['tabs'][0]['output'] as $key => $value) {
        if ($value['#link']['path'] == "user/%/view"){


| improve this answer | |
  • Thank you for this nice answer! I added if($data['tabs']) before the foreach in order to check whether there are any tabs. Otherwise, if that is not the case, one gets an error message. – Jeroen Jun 26 '15 at 21:54

If you give the appropriate permission to the user, only then the view and edit tag will visible otherwise it will not be visible. (For checking you can sign out from the website and click the menu in user page. The view and edit tag will not visible)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.