hi,
thanks for your post... after reading your thread, I looked into the code and didn't understand why menu_data() only answers the menu data if the menu is marked as "Add to Menu?" on line 188 in theme_functions.php
so i changed it to:
i modified your code, writing a small function which gets the slug-id and responds with the children-slugs
a developer can write a wrapper function and use that for rendering the submenu
thanks for your post... after reading your thread, I looked into the code and didn't understand why menu_data() only answers the menu data if the menu is marked as "Add to Menu?" on line 188 in theme_functions.php
Code:
if ($page['menuStatus'] == 'Y' && $page['private'] != 'Y') { ... }
so i changed it to:
Code:
if ($page['private'] != 'Y') { ... }
i modified your code, writing a small function which gets the slug-id and responds with the children-slugs
Code:
function get_submenu_data($id) {
$navdata = menu_data("doesnotexist");
$parent_slug = $id."/";
$result = array();
foreach ($navdata as $navpoint) {
if ($navpoint['parent_slug']==$parent_slug) {
$result[] = menu_data($navpoint['slug']);
}
}
return $result;
}
a developer can write a wrapper function and use that for rendering the submenu