function _dhtml_menu_unique_id in DHTML Menu 6.3
Same name and namespace in other branches
- 8 dhtml_menu.theme.inc \_dhtml_menu_unique_id()
- 6.4 dhtml_menu.theme.inc \_dhtml_menu_unique_id()
- 7 dhtml_menu.theme.inc \_dhtml_menu_unique_id()
Keeps track of ID attributes and adds a suffix to make it unique-when necessary.
1 call to _dhtml_menu_unique_id()
- dhtml_menu_theme_menu_item_link in ./
dhtml_menu.module - Preprocessor for menu_item_link. Adds an ID attribute to menu links and helps the module follow the recursion of menu_tree_output().
File
- ./
dhtml_menu.module, line 241 - dhtml_menu.module Adds preprocessors to the menu theming functions that will add dynamic expansion to their menus.
Code
function _dhtml_menu_unique_id($id) {
static $ids = array();
if (!isset($ids[$id])) {
$ids[$id] = 1;
return $id;
}
else {
return $id . '-' . $ids[$id]++;
}
}