Framework
Breadcrumbs
Utility links
- Global variable
$nav_menu
- Declared in
/_hostmgr/_config/config.php
nav_menu_class defined in [COMMON_CLASS_DIR]navmenu/nav_menu_class.php
- Create an new utility link with
$nav_menu->add_node($label, $url, $target, $onclick, $level, $dom_id, $attributes);
$label Text label displayed for this item in the navigation menu.
$url (Optional) The URL the menu item links to.
$target (Optional) Menu item target. Allows for opening the URL in a new browser window.
$onclick (Optional) JavaScript "onclick" code. Best to set a selector with $dom_id and set the handler with JQuery on page load.
$level (Optional) Indentation level of the menu item. Defaults to 0.
$dom_id (Optional) Sets the id attribute of the menu item element. Hook for selecting the element with JQuery.
$attributes (Optional) Hook to set any additional attributes for the menu item element. This could be set to "data-id=\"123\"" for example.