function footermap_get_primary_menus in footermap: a footer site map 5.2
Same name and namespace in other branches
- 6 footermap.module \footermap_get_primary_menus()
- 7 footermap.module \footermap_get_primary_menus()
Get all the primary menus with pid = $topmenu
Parameters
topmenu pid integer value:
Return value
array an array of menu names
1 call to footermap_get_primary_menus()
- footermap_settings in ./
footermap.module - Setup settings form for footermap
File
- ./
footermap.module, line 319 - This module queries the menu for pages and makes a dynamic sitemap at the bottom of the page.
Code
function footermap_get_primary_menus($topmenu = 0) {
$ret = array();
if (!is_numeric($topmenu)) {
// let's be careful
$topmenu = 0;
}
$res = db_query("select distinct title from {menu} where pid = %d", $topmenu);
while ($menu = db_fetch_object($res)) {
$ret[$menu->title] = t($menu->title);
}
return $ret;
}