function _dhtml_menu_unique_id in DHTML Menu 8
Same name and namespace in other branches
- 6.4 dhtml_menu.theme.inc \_dhtml_menu_unique_id()
- 6.3 dhtml_menu.module \_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.theme.inc - 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.theme.inc, line 208 - dhtml_menu.theme.inc All functions related to generating the menu markup.
Code
function _dhtml_menu_unique_id($id) {
static $ids = array();
if (!isset($ids[$id])) {
$ids[$id] = 1;
return $id;
}
else {
return $id . '-' . $ids[$id]++;
}
}