How can i add a new tab in node tabs ( with edit, view tabs ) and show a page on this new tab ? i am working on a shopping cart where i need to add a new configuration tabs with nodes and ubercart products.

1 Answer 1


You need to define a new URL by using hook_menu.

There, 'type' is set as MENU_LOCAL_TASK and URL is like 'node/%node/CUSTOM_CONFIG'.

Code snippet from the hook_menu in node.module:

 $items['node/%node/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'node_page_edit',
    'page arguments' => array(1),
    'access callback' => 'node_access',
    'access arguments' => array('update', 1),
    'weight' => 0,
    'type' => MENU_LOCAL_TASK,
    'file' => 'node.pages.inc',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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