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
Comment | File | Size | Author |
---|---|---|---|
#13 | superfish-1470956-13.patch | 4.43 KB | OnkelTem |
Comments
Comment #1
mehrpadin CreditAttribution: mehrpadin commentedHey there,
Email me the URL if it's online.
Comment #2
AnN CreditAttribution: AnN commentedComment #3
mehrpadin CreditAttribution: mehrpadin commentedHey,
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'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.Comment #4
AnN CreditAttribution: AnN commentedThanks 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.
Comment #5
mehrpadin CreditAttribution: mehrpadin commentedAs far as I see it's still the v1.8.
Comment #6
AnN CreditAttribution: AnN commentedWell, 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?
Comment #7
mehrpadin CreditAttribution: mehrpadin commentedAre you sure you've downloaded this? http://drupal.org/node/1351768
Comment #8
AnN CreditAttribution: AnN commentedYes, I am positively sure. :) I even disabled and deleted the old version module, and than installed the new one - no difference.
Comment #9
OnkelTem CreditAttribution: OnkelTem commentedActive-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"):
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.Comment #10
OnkelTem CreditAttribution: OnkelTem commentedPath class doesn't work
Comment #11
OnkelTem CreditAttribution: OnkelTem commentedFor 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.
Comment #12
mehrpadin CreditAttribution: mehrpadin commentedComment #13
OnkelTem CreditAttribution: OnkelTem commentedThis 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.
Comment #14
OnkelTem CreditAttribution: OnkelTem commentedBump
Comment #15
kevster CreditAttribution: kevster commentedI 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;
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...
Comment #16
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commented