views:

21

answers:

1

I have primary links created manually. The are links to node (content type 'page') like

-About
--About Us
--About company

I need to add subitems About/About company/company1 and About/About company/company2 from my module.

Next lines create menu item in first level (in one level with -About)

$items['about2'] = array(
  'menu_name' => 'primary-links',
  'title' => 'About2',
  'page callback' => 'ninegm_about2',
  'access callback' => TRUE,
  'weight' => -10,
);
+1  A: 
Jergason
Thank you.Only 'About', 'About company' are menu titles which I enter in Menu settings section of node editing$items['I dont know this value'] = array('title' => 'About', ...);
Andrey Kostromin
It's `$item['menu path']` (`$items['node/%node/edit']`, `$items['user/%user/edit']`, etc).
kiamlaluno
Like kiamlaluno said, you can use placeholders in your menu path. Check out http://api.drupal.org/api/function/page_example_menu/6 and http://api.drupal.org/api/group/menu/6 for examples on how to do this.
Jergason

related questions