0

I have a suite of modules that go together, and they are all ideally housed under one parent item on the 'management' menu. The normal pages of these modules are correctly being placed under this parent item, but I have a module that has several sub-pages that are tabbed menu items of their parent page. The parent page of these sub-items is appearing on the root of my management menu. I would like for it to be inside of the parent menu group for these modules.

Is there a menu option I can provide to the menu to tell it to use a tabbed menu, but also be a child item to the parent item I provide?

I have provided an image to show how it's currently setup, and the code I am using to generate the tabbed menu.

enter image description here

function atavism_core_menu() {
$items['admin/atavism/config/server-configuration'] = array(
    'title' => 'Server Configuration',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('atavism_core_server_config_form'),
    'access callback' => 'user_access',
    'access arguments' => array('configure servers'),
);

$items['admin/atavism/config/server-configuration/configure'] = array(
    'title' => 'Master Server Configuration',
    'page callback' => 'drupal_get_form',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'page arguments' => array('atavism_core_server_config_form'),
    'access callback' => 'user_access',
    'access arguments' => array('configure servers'),
);

$items['admin/atavism/config/server-configuration/servers'] = array(
    'title' => 'Server List',
    'page callback' => 'drupal_get_form',
    'type' => MENU_LOCAL_TASK,
    'page arguments' => array('atavism_core_server_list_form'),
    'access callback' => 'user_access',
    'access arguments' => array('configure servers'),
);
}

The 'Server Configuration' menu should be under the 'Atavism' parent menu.

  • I'll add the remaining modules use $item[admin/atavism/*] paths as well and they are all correctly stored under the right parent menu. – Ex0r Mar 21 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.