I would like to have a tab appear in the view of a node, like the "View, Edit, and in the example shown) the Group Tab. Any ideas? I'm guessing it is going to have to write some custom code.

(see attachement) enter image description here


For creating tab in views you have to go to the menu option in your views and select menu tab option then create your menu that will reflect as tab. If you are not clear enough. Then let me know the exact requirement, like where do you want to create tab, on landing page after login or on custom view page.

You can do this without custom code as i have done same thing many times.


Drupal by default displays the tab to the users who have the permission to access the particular section. For example, you can see these tabs when you are logged in as administrator (user1) of the site. If any other role has the permission to edit the node, then the edit tab will be displayed to the user having that role, by default.

EDIT: Extra tabs may get added by adding contributed modules to the site (also depends on the permission to the users to access it). See the screenshot, it adds an extra tab Devel to the node type page. It is because I downloaded and enabled the Devel module. snapshot


in your module you can add menu with its function callback

$items['user/%user/group'] = array(
    'title' => 'Group',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'user_group_page',
    'access callback' => TRUE,

this should be in yourmodule_menu() hook function. user_group_page() will return content for this tab you should define it in your code


If you are talking about default tab for any node you created then add a line to your page.tpl.php.

<?php if ($tabs): ?>
              <div class="tabs">
                <?php print render($tabs); ?>
           <?php endif; ?>}

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.