diff options
Diffstat (limited to 'finder_menu.module')
-rw-r--r-- | finder_menu.module | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/finder_menu.module b/finder_menu.module index 6b757b3..6857987 100644 --- a/finder_menu.module +++ b/finder_menu.module @@ -110,7 +110,7 @@ function theme_finder_menu($menu_name, $mlid) { // Build the menus $output = '<div id="finderparent">'; - $output .= finder_menu_build($menu, TRUE); + $output .= finder_menu_build($menu, "finder"); $output .= '</div>'; drupal_add_js(drupal_get_path('module', 'finder_menu') .'/finder_menu.js'); @@ -122,12 +122,14 @@ function theme_finder_menu($menu_name, $mlid) { * * @ingroup themeable */ -function finder_menu_build($menu, $first = FALSE) { +function finder_menu_build($menu, $id = null) { - if ($first === TRUE) { + if ($id == "finder") { $output = '<ul id="finder">'; + $id = 0; } else { - $output = '<ul>'; + $id = ($id == null) ? 0: $id; + $output = '<ul id="finder[ul][' . $id . ']">'; } foreach ($menu as $menu_item) { @@ -135,7 +137,7 @@ function finder_menu_build($menu, $first = FALSE) { $output .= '<li>'; if ($menu_item['below'] !== FALSE && finder_menu_has_unhidden_submenu($menu_item['below'])) { $output .= $menu_item['link']['title']; - $output .= finder_menu_build($menu_item['below']); + $output .= finder_menu_build($menu_item['below'], ++$id); } else { $output .= theme('menu_item_link', $menu_item['link']); } |