Menu in custom module disappears

Events happening in the community are now at Drupal community events on www.drupal.org.
DrupalCuckoo's picture

Hi Guys,

I'm developing a custom module for some privacy stuff. My module provides a new page under "user/[UID]/edit/privacy".

<?php
/**
* Implementation of hook_menu()
*/
function MY_MODULE_menu() {

  
$items['user/%user/edit/privacy'] = array(
     
'title' => 'Privacy',
     
'page callback' => 'drupal_get_form',
     
'page arguments' => array('MY_MODULE_privacy_settings'),
     
'access arguments' => array('administer site configuration'),
     
'type' => MENU_LOCAL_TASK,
     
'weight' => 100,
     
'file' => 'MY_MODULE_privacy.admin.inc'
  
);

   return
$items;

}
?>

When I go to "user/1/edit" I can see the tab "Privacy" (see attached file "User's Edit Page"). But when I click on it (to get to the privacy settings) the second level of the menu hierachy disappears and it's like I'm on the first level where the tabs "Home", Edit", etc. are located (see attached file "User's Privacy Settings Page").

Why is this happening and how can I solve this?

thanks for any help :)

best regards.

AttachmentSize
User's Edit Page7.47 KB
User's Privacy Settings Page7.13 KB

Comments

Is there no one who can help

DrupalCuckoo's picture

Is there no one who can help me? :-(

Maybe it's important to know that I use the panels and advanced profile kit modules to build the user profile pages.

ehlel

Munkhbuyan's picture

<?php
/**
* Implementation of hook_menu()
*/
function MY_MODULE_menu() {

  
$items['user/%user/edit/privacy'] = array(
     
'title' => 'Privacy',
     
'page callback' => 'drupal_get_form',
     
'page arguments' => array('MY_MODULE_privacy_settings'),
     
'access arguments' => array('administer site configuration'),
     
'type' => MENU_LOCAL_TASK,
     
'weight' => 100,
     
'file' => 'MY_MODULE_privacy.admin.inc'
  
);

   return
$items;

}
?>

Social Networking Sites

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: