Menu tree structure fails to build
mkalkbrenner - November 7, 2007 - 21:01
| Project: | Drupal |
| Version: | 5.7 |
| Component: | menu system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs review) |
Jump to:
Description
If you create a tree structure of MENU_NORMAL_ITEMs via hook_menu only the parent element (root element) will be shown. I attached a patch to solve this issue in include/menu.inc. Use this code to reproduce the issue:
<?php
function YOUR_MODULE_menu($may_cache) {
$items = array();
if ($may_cache) {
}
else {
$items[] = array(
'path' => 'parent',
'title' => 'Parent',
'access' => TRUE,
'type' => MENU_NORMAL_ITEM | MENU_EXPANDED,
);
$items[] = array(
'path' => 'parent/child',
'title' => 'Child',
'access' => TRUE,
'type' => MENU_NORMAL_ITEM,
);
}
return $items;
}
?>| Attachment | Size |
|---|---|
| menu.inc_.patch | 683 bytes |

#1
#2
#3