What is the way to add a new menu-item-tab to the path "node/%/edit", when % means my node-id? And if so, can I restrict this additional item to a certain content-type?

Comments

tomrenner’s picture

ok - i found out myself ;-)
in case anybody else is concerned:

$items[] = array('path' => 'node/'. arg(1) .'/mypage',
'title' => t('My Page'),
'callback' => 'mymodule_form',
'callback arguments' => array('node', arg(1)),
'access' => TRUE,
'type' => MENU_LOCAL_TASK,
);

aks_richa’s picture

hey i am new to drupal, i want to add webform page on account page so from that page user will redirect to webform.

Ocularconcepts’s picture

You can use this code to add new Tab in user account section.

<?php
// You can change this as per your requirements 'weight' => 6,
$items['user/%/newtab'] = array(
    'title' => 'New Tab',
    'page callback' => 'function_name',
    'access arguments' => array('access param'),
    'weight' => 6,
    'type' => MENU_LOCAL_TASK,
  );

?>