Hey there and thanks for this great module.

I've got one problem using it: normally active menu links get a class "active" assigned which is important for me to style my menus. Is there an easy way to assign that class?
I need the currently active item highlighted when using the drop down menu.

Also the active trail classes seem odd to me, as all sub items of one menu item get it assigned, instead of just the parent.. Oo

Regards,
Daniel

Comments

daniel wentsch’s picture

PS: I just found out that all silbling menu items after the currently active item get an active-trail class assigned.

E.G. if my menu structure is something like "MENU 1 | MENU 2 | MENU 3"

and MENU 2 is active, MENU 3 also gets the class .active-trail, which imho ist simply wrong?

PPS: I solved the problem by not using the superfish module anymore but rendering the menu depth I need by the module "menu_blocks" (which appends .active and .active-trail classes correctly) and then modifying this output using superfish normally on my template.

augiem’s picture

I can also confirm the active-trail does not work correctly at all in this module. I tried to fix it in the module PHP but got nowhere. It seems to be returning 'is_active_trail' for every link item regardless.

augiem’s picture

wentsch:
How were you able to get superfish working in your template? I have multiple menus on my site and all have the same .menu class. I only want one Superfish menu, but I cannot find a way to set a new class on the topmost UL in menu_blocks. Superfish defaults to class .sf-menu on the topmost ul, though I can change this, but it doesn't work if I create a div with class "sf-menu" around the ul. It seems the target class must be on the UL and not any other element. Any help?

-------------

Update: Sorry I solved my own problem seconds after posting. I wrapped the menu in a DIV class="sf-menu", then I changed all the CSS in Superfish.css find ".sf-menu" and replace with "div.sf-menu ul". This worked for me.

mehrpadin’s picture

Hey there,

It's not so, I mean only if the MENU 1 being the parent of the other menus and\or all of them pointing out to same pages, otherwise it's not possible, however I'll double-check this in the upcoming v1.4. Also, the "active" class is dedicated to the hyperlinks (< A >) and not the list items (< LI >) , the list items - parent and the one for current page - get "active-trail" class and the hyperlink(s) pointing out to current page gets the "active" class.

daniel wentsch’s picture

Just to let you know: my MENU 1 was definately a silbling of MENU 2, MENU 3 etc, not the parent item.

mehrpadin’s picture

Hey.

I triple-checked it and I'm now quite confident that both "active-trail" & "active" classes are working flawlessly. Perhaps, you both did override the "build" function in your themes? or something like that, I've no idea! uhhmmm... one more question: which version are you using?

daniel wentsch’s picture

I was using version 6.x-1.3.

mehrpadin’s picture

Servus!

Completely forgot this issue! sorry!!

Daniel, can you please check v1.6 and let me know if you get the same problem? nevertheless I'm sure v1.3 had no such a problem, I rather suspect we're misunderstanding each other.

daniel wentsch’s picture

I'm sorry, but as mentioned before, I'm not using the module anymore and I rather don't wanna change the site as it's working right now. Thanks for asking though.

mehrpadin’s picture

Status: Active » Closed (fixed)