Cannot create hook_menu subitems with proper position in administrative menu I would like to add an hook_menu item and generate its expandable subitems under ubercart's 'admin/store/' path. 

For now I have:

function activit_menu() {

  $items['admin/store/products-fabrics'] = array(
      'title' =&gt; 'Látky produktov',
      'access arguments' =&gt; array('access administration menu'),
      'type' =&gt; MENU_NORMAL_ITEM,
  );

      $items = array_merge($items, activit_generate_products_fabrics_menu_items());

    }



function activit_generate_products_fabrics_menu_items() {

  $products = activit_get_products_with_fabrics();

  $items = array();

  foreach($products as $product) {

    $items['admin/store/products-fabrics/'.$product['nid']] = array(
        'title' =&gt; $product['title'],
        'access arguments' =&gt; array('access administration menu'),
        'file' =&gt; 'd_forms.inc',
        'page callback' =&gt; 'drupal_get_form',
        'page arguments' =&gt; array('activit_eshop_fabrics_of_products_form'),
        'type' =&gt; MENU_LOCAL_ACTION
    );

  }

  return $items;

}


But this code will create both 'products-fabrics' item and all its subitems at the same level in administration menu and 'admin/store/products-fabrics' item is not expendable. After clicking at 'products-fabrics' item you will see the same andimistration page as aftre clicking at 'admin/store' plus the subitems links at the top oft he page. I can hide this page with css an let only the subitems to be visible. But I need to create expandable 'admin/store/products-fabrics' item in order to be able to click directly at 'admin/store/products-fabrics/subitem'. 

I was trying all the possible item types but no success. Is there something I am missing?
I think the MENU_LOCAL_ACTION type for your sub-menus is not the good choice.

The Menu item types documentation tell us :


  MENU_LOCAL_ACTION : Menu type -- An action specific to the parent,
  usually rendered as a link.


If you want to have a menu with sub-menus, you need to also define a page call back for it. You can use the system_admin_menu_block_page, witch display a bloc with all the sub-menus links.

// Main menu link
$items['admin/store/products-fabrics'] = array(
    'title' =&gt; 'Látky produktov',
    'page callback' =&gt; 'system_admin_menu_block_page',
    'access arguments' =&gt; array('access administration pages'),
    'file' =&gt; 'system.admin.inc',
    'file path' =&gt; drupal_get_path('module', 'system'),
    'type' =&gt; MENU_NORMAL_ITEM,
);

// Sub menu links
$items['admin/store/products-fabrics/'.$product['nid']] = array(
    'title' =&gt; $product['title'],
    'access arguments' =&gt; array('access administration menu'),
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('activit_eshop_fabrics_of_products_form'),
    'type' =&gt; MENU_NORMAL_ITEM,
    'file' =&gt; 'd_forms.inc',
);