Hello!

I want to create an tab called 'Change' under user/%user/edit/tcchange. With Drupl 5.x it worked fine. Now I upgraded my test environment to Drupal 6.12 and I have following problem: when I press the button 'Change', other tab writers like 'My subsciptions' (simplenews) and the 'edit' button disappear.

Can anyone give quick support?
Thanx in advance!

----------------

Old code:
function tcchange_menu($may_cache) {
global $user;
$items = array();
if ($user->uid == arg(1)) {
if (!$may_cache) {
if (arg(0) == 'user' && is_numeric(arg(1))) {
$account = user_load(array('uid' => arg(1)));
$items[] = array(
'path' => "user/". arg(1) ."/edit/tcchange",
'title' => t('Change'),
'callback' => 'tcchange_all',
'access' => user_access('access content'),
'type' => MENU_LOCAL_TASK, 'weight' => 2);
}
}
}
return $items;
}

New code:
function tcchange_menu() {
$items = array();
$items['user/%user/edit/tcchange'] = array(
'title' => 'Change',
'page callback' => 'tcchange_all',
'access arguments' => array('access content'),
'type' => MENU_LOCAL_TASK, 'weight' => 2,
'tab_parent' => 'user/%/edit',
);
return $items;
}

Comments

grisu’s picture

Status: Active » Closed (fixed)