Hi,
I use this module to a big menu (has lot of itens). I think it is more easy for users to navigate in the menu by clicking the word(s) of the link, instead of the small plus(+) or minus (-) signals. can someone tell me how to do that?

Comments

malapeiro’s picture

no one can help me?

malapeiro’s picture

i am not a web developer but i think the problem is that the menu words are outside the tag. i think this can be solved in the jquerymenu.module file but i don t know how...

_grizly’s picture

You'll need to override or change the css in /sites/all/modules/jquerymenu/jquerymenu.css

Simply remove the buttons:

ul.jquerymenu li.parent span.open, ul.jquerymenu li.parent span.closed { 
  background: none; 
}

Then, you'll need to edit the php a bit, so the text is in the correct place, and is therefore Clickable:

Replace /sites/all/modules/jquerymenu/jquerymenu.module's function theme_jquerymenu_links with the following:

/**
 * Render a single link, possibly with open/close link and/or edit button.
 */
function theme_jquerymenu_links($variables) {
  // create values from the parameter array
  $title        = $variables["title"];
  $path         = $variables["path"];
  $options      = $variables["options"];
  $state        = $variables["state"];
  $classes      = $variables["classes"];
  $has_children = $variables["has_children"];
  $edit_path    = $variables["edit_path"];
  $edit_text    = $variables["edit_text"];
  $edit_access  = $variables["edit_access"];
  
  $parentlink = variable_get('jquerymenu_parentlink', 0);

  $output = '';
  // This is the span that becomes the little plus and minus symbol.
  $plus = '<span' . (empty($classes) ? '>' : ' class="' . implode(' ', $classes) . '">') . '</span>';
  $plus_title = '<span' . (empty($classes) ? '>' : ' class="' . implode(' ', $classes) . '">') . $title .'</span>&nbsp;'; //custom version with clickable title, invisible space needed for block break.
  $link = l($title, $path, $options);
  if ($edit_path != NULL && user_access($edit_access)) {
    $edit_box = jquerymenu_edit_box($edit_path, $edit_text);
    if ($has_children != 0) {
      $output .= $parentlink ? $edit_box . $plus . $title : $edit_box . $plus . $link;
    }
    else {
      $output .= $edit_box . $link;
    }
  }
  else {
    if ($has_children != 0) {
      $output .= $parentlink ? $plus_title : $plus . $link; //use clickable title.
    }
    else {
      $output .= $link;
    }
  }
  return $output;
}

YMMV