Hi,
here's a small patch I often use to have a submenu open if the current page belongs to it (nav-bar style).
Included in the patch is the corrected javascript and mdofications to the settings page to enable it, or not.
Could be useful I think.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

axe312’s picture

Hahaha! Iam so happy that I found that before I started to write the same ^^

Pls add it to the core!!!

axe312’s picture

FileSize
2.3 KB

Patch of #1 failed. I applied it manually and fixed a bug.

Heres the new one. Works with the newest 6.x-2.x-dev version! (maybe also works on stable version)

garethsprice’s picture

Version: 6.x-2.x-dev » 7.x-2.0-beta2
FileSize
2.42 KB

Here's the patch rolled against 7.x-2.0-beta2. Great work, thanks!!

Barfly’s picture

Hi,

I tried the patch "openmenuatstart-7.x-2.0-beta2.patch" but it doesn't work for me.

Could you please upload your "nice_menu.module" and "nice_menu.js" allready patched please :)

Thanks

Barfly’s picture

My bad, it 's working but only for "core" menu (navigation, main ...)

it doesn't work for "custom" menu.
I tried to look @ the code but i didn't understand what it does and why custom menu had not the "submenu open at start".

jdanthinne, do you have an answer?

Thank you.

vordude’s picture

Status: Needs review » Needs work

Not particularly interested in it myself. If this is solid, I'd consider adding it to the module. I don't plan on spending much of my time on it.

jdanthinne’s picture

FileSize
2.02 KB

Here's my lastest diff file.
It's working fine for both 6.x and 7.x.

@Barfly : the patch is working on every menu on my side. What are you calling "custom" menu?
@vordude : sad. I think it's "solid", and I use it on 1 website out of 2, very useful for two levels navigation bar. What needs "work"?

tomlee’s picture

openmenuatstart-7.x-2.0-beta2.patch works for me but hunk 3 in nice_menus.module should be removed, otherwise it failed.

Please add it to the core!