function _dhtml_menu_unique_id in DHTML Menu 7
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()
- 6.3 dhtml_menu.module \_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_preprocess_menu_link in ./
dhtml_menu.theme.inc - Preprocessor for menu_link. Adds the required HTML attributes and loads subtrees if necessary.
File
- ./
dhtml_menu.theme.inc, line 155 - 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]++;
}
}