function theme_nice_menu in Nice Menus 5
Same name and namespace in other branches
- 6 nice_menus.module \theme_nice_menu()
General theming function to allow any menu tree to be themed as a nice menu.
Parameters
$id: The nice menu ID.
$pid: The parent menu ID from which to build the nice menu
$direction: Optional. The direction the menu expands. Default is 'right'.
$menu: Optional. A custom menu array to use for theming -- it should have the same structure as that returned by menu_get_menu(). Default is the standard menu tree.
Return value
An HTML string of nice menu links.
2 theme calls to theme_nice_menu()
- nice_menus_block in ./
nice_menus.module - Implementation of hook_block().
- theme_nice_menu_primary_links in ./
nice_menus.module - Theme primary links as nice menus
File
- ./
nice_menus.module, line 253
Code
function theme_nice_menu($id, $pid, $direction = 'right', $menu = NULL) {
$output = array();
if ($menu_tree = theme('nice_menu_tree', $pid, $menu)) {
if ($menu_tree['content']) {
$output['content'] = '<ul class="nice-menu nice-menu-' . $direction . '" id="nice-menu-' . $id . '">' . $menu_tree['content'] . '</ul>' . "\n";
$output['subject'] = $menu_tree['subject'];
}
}
return $output;
}