function _site_map_menus in Site map 6
Same name and namespace in other branches
- 8 site_map.module \_site_map_menus()
- 5 site_map.module \_site_map_menus()
- 6.2 site_map.module \_site_map_menus()
- 7 site_map.module \_site_map_menus()
Render menus.
1 call to _site_map_menus()
- theme_site_map_display in ./
site_map.module - Return a themed site map.
File
- ./
site_map.module, line 360 - Original author: Nic Ivy Now maintained by by Fredrik Jonsson fredrik at combonet dot se
Code
function _site_map_menus() {
global $language;
if (module_exists('locale')) {
$mids = variable_get('site_map_show_menus_' . $language->language, array());
}
else {
$mids = variable_get('site_map_show_menus', array());
}
$output = '';
if ($mids) {
foreach ($mids as $mid) {
$menu = menu_load($mid);
// Use menu_tree_all_data to retrieve the expanded tree.
$tree = menu_tree_all_data($mid);
if (module_exists('i18nmenu')) {
i18nmenu_localize_tree($tree);
}
$menu_display = menu_tree_output($tree);
if (!empty($menu_display)) {
$title = $menu['title'];
$output .= theme('site_map_box', $title, $menu_display, 'sitemap-menu');
}
}
}
return $output;
}