Hi guys,
I have the following issue:
I am configuring my menu and I would like for the parent item to stay expanded when click on it. I understand that this cannot be done with this module, but I'd like at least to have the parent expanded when it is selected or its child is selected (current node).
So as I understood the Path Level property is the setting I should configure for this purpose. But I set Path Level to 3 (I want the menu expanded as much as possible) and still when a children is selected, the parent item is not expanded. From firebug I can tell that both the child and the parent item have "active-trail" class set, but still the child is not visible.

I would appreciate any help!

AnN

CommentFileSizeAuthor
#13 superfish-1470956-13.patch4.43 KBOnkelTem
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mehrpadin’s picture

Hey there,

Email me the URL if it's online.

AnN’s picture

mehrpadin’s picture

Hey,

Thanks for the URL, please upgrade the module to v1.9-beta4 and also the library to its latest version if it's not, and then set the Path level to 2 or more.

Also, regarding this:

I understand that this cannot be done with this module ...

I'm afraid it can be done with this module. Those issues either date back to when the Drupal core had a problem with custom menus and the active-trail class or are asking for the sub-menus in a NavBar to not to disappear when the mouse leaves the parent menu item, which is of course not really impossible, but needs a little hack at the moment, well it's not the case here anyway.

AnN’s picture

Thanks for the advice, but after upgrading the library and the module, there seem to be no difference. Btw when I ried the update.php it said that there are no modules for update, so I just deleted the old version and copied the new one on its place.

mehrpadin’s picture

As far as I see it's still the v1.8.

AnN’s picture

Well, I deleted the v1.8 folder in modules, and copied 1.9, than I run update.php but the script said that there are no module for update.I have not ever updated a module, so I don't know if I am doing something wrong?

mehrpadin’s picture

Are you sure you've downloaded this? http://drupal.org/node/1351768

AnN’s picture

Yes, I am positively sure. :) I even disabled and deleted the old version module, and than installed the new one - no difference.

OnkelTem’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
Category: support » bug

Active-trail is set, but path class seems to do nothing.
Latest dev, superfish lib was downloaded from the module's page either.

This is my menu HTML (copied from Chrome Dev Tools "as HTML"):

<ul id="superfish-2" class="menu sf-menu sf-menu-catalogues sf-horizontal sf-style-space-orange sf-total-items-2 sf-parent-items-1 sf-single-items-1 superfish-processed sf-js-enabled sf-shadow">
  <li id="menu-1903-2" class="active-trail first odd sf-item-1 sf-depth-1 sf-total-children-1 sf-parent-children-0 sf-single-children-1 menuparent">
    <a href="/taxonomy/term/25" title="Viadana" class="sf-depth-1  menuparent sf-with-ul">Viadana<span class="sf-sub-indicator"> »</span></a>
    <ul style="float: none; width: 12em; top: -99999em; " class="sf-hidden">
      <li id="menu-1912-2" class="active-trail firstandlast odd sf-item-1 sf-depth-2 sf-no-children" style="white-space: normal; float: left; width: 100%; ">
        <a href="/taxonomy/term/35" title="Блоки" class="sf-depth-2 " style="float: none; width: auto; ">Блоки</a>
      </li>
    </ul>
  </li>
  <li id="menu-1905-2" class="last even sf-item-2 sf-depth-1 sf-no-children">
    <a href="/taxonomy/term/26" title="PEM" class="sf-depth-1 ">PEM</a>
  </li>
</ul>

Path class is set to 2.

A sidenote: Is it ok that "active-trail" class is missing on <a> elements? Standard way is to preserve it. For example, in my setup I got CSS formatting lost after I turn a menu into Superfish. Before, when it was a Menu Block, I had links properly stylized.

OnkelTem’s picture

Priority: Normal » Major

Path class doesn't work

OnkelTem’s picture

For example it won't work if Menu Type is not set to "NavBar":

http://drupalcode.org/project/superfish.git/blob/refs/heads/7.x-1.x:/sup...

Example of a layout when menu is Vertical, but Path Class is used: http://corp.aol.com/our-values/corporate-sustainability

I think this is bug. It must be up to a user to decide whether to use Path Class or not.

mehrpadin’s picture

Category: bug » feature
OnkelTem’s picture

Status: Active » Needs review
FileSize
4.43 KB

This patch provides new "Show path" checkbox option on the Superfish block configuration form for explicit control over appearance of sub-menus in the path (in active trail).

When it is unchecked (default), then both "Path Class" and "Path Levels" options are hidden now and the path doesn't display.
When it is checked, then both "Path Class" and "Path Levels" options are displayed, saved, and the path displays.

OnkelTem’s picture

Bump

kevster’s picture

Issue summary: View changes

I found this same issue so I upgraded to latest dev 7.x-1.x-dev (from 7.x-1.9). This gives me more options but still doesnt follow the active-trail or show path rules.

I cant show the site yet as its in dev and behind an htaccess. I noticed that the top level li and also the sub menu li are both set as active trail but the sub menu ul is by default set to sf-hidden which effectively keeps the whole ul closed when going to a sub menu page. I tried all the variation settings to try and get this to work, in the end I managed to override the css to this;

.sf-expanded .sf-has-clone-parent, 
li.active-trail .sf-hidden
{
  position: relative !important;
  left:0;
  top:2px;
  float:left;
  padding-bottom: 10px;
  
}

Its not the ideal solution but it does fix my issue of clicking (im using onclick not onhover) on a sub menu link and being directed to the page but having the sub menu ul closed as it overrides the sf-hidden selector.

One downside is that if you have a sub menu open then when you click another top level item it opens but doesnt close the current active-trail menu - I can live with this...

Ive used my own css taken from the default module and put in my theme...

Very useful module though with lots of config options...

LOBsTerr’s picture

Status: Needs review » Closed (outdated)