Closed (won't fix)
Project:
Drupal core
Version:
6.0
Component:
menu system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2009 at 20:19 UTC
Updated:
17 Sep 2011 at 17:33 UTC
I want to add a tree of links to a custom menu that already exists (created in admin/build/menu). I want to do this programatically based on an array I have. I don't maintain the menu but if it's there I need certain links to exist in it.
Given:
I want:
What's the best way to go about this? I've tried hook_menu and hook_menu_alter and can get my items to show in the menu but not according to their tree design. My $items array looks like this:
<?php
$items['C'] = array(...);
$items['C/1'] = array(...);
$items['C/2'] = array(...);
$items['C/2/a'] = array(...);
$items['C/2/b'] = array(...);
$items['C/2/c'] = array(...);
$items['C/2/d'] = array(...);
$items['C/3'] = array(...);
?>
All items are showing up on the same level though. What should I be specifying in array(...) that actually makes the tree? I was under the impression that the menu module based the tree structure on the keys of the $items array.
Thanks!
Comments
Comment #1
jody lynnClosing this as an old support request