aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--finder_menu.module61
1 files changed, 1 insertions, 60 deletions
diff --git a/finder_menu.module b/finder_menu.module
index 340d300..1b65d7e 100644
--- a/finder_menu.module
+++ b/finder_menu.module
@@ -78,9 +78,6 @@ function finder_menu_theme() {
* Generate the menu.
*/
function theme_finder_menu($menu_name, $mlid) {
- $item_class = "finder-menu-menu-item";
- $sub_item_class = "finder-menu-sub-menu-item";
-
// Find menu item in the menu tree
$menu_tree = menu_tree_all_data($menu_name);
@@ -132,69 +129,13 @@ function theme_finder_menu($menu_name, $mlid) {
// Build the menus
$output = '<div id="finderparent">';
- $output .= finder_menu_build($menu);
+ $output .= taxonomy_node_tree_list($menu, 'finder', 'hidden');
$output .= '</div>';
return $output;
}
/**
- * Recursively build the menu.
- *
- * @ingroup themeable
- */
-function finder_menu_build($menu) {
-
- global $_finder_menu_id;
-
- if ($_finder_menu_id == NULL) {
- $output = '<ul id="finder" class="hidden">';
- $output .= implode((array) module_invoke_all('finder_menu_build'));
- $_finder_menu_id = 0;
- }
- else {
- $output = '<ul id="finder[ul]['. $_finder_menu_id .']" class="hidden">';
- }
-
- foreach ($menu as $menu_item) {
- if ($menu_item['link']['hidden'] == 0) {
- $output .= '<li>';
- if ($menu_item['below'] !== FALSE && finder_menu_has_unhidden_submenu($menu_item['below'])) {
- $output .= $menu_item['link']['title'];
- $_finder_menu_id++;
- $output .= finder_menu_build($menu_item['below']);
- }
- else {
- $output .= theme('menu_item_link', $menu_item['link']);
- }
- $output .= '</li>';
- }
- }
-
- $output .= '</ul>';
- return $output;
-
-}
-
-/**
- * Check whether a menu has at least one unhidden submenu.
- */
-function finder_menu_has_unhidden_submenu($menu = FALSE) {
-
- if ($menu == FALSE) {
- return FALSE;
- }
-
- foreach ($menu as $menu_item) {
- if ($menu_item['link']['hidden'] == 0) {
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-/**
* Finder Menu Javascript theme function.
*
* @ingroup themeable