Hi there, I've added the D6 functionality of closing the siblings of a menu upon opening it.
I've not yet set is as an option in the DHTML menu settings page, but I'm working on that so I can finally roll out my first contribution \o/
here's the temporary version of the js to have direct siblings close upon opening a menu, which in other words simple makes sure that only 1 menu is open at a time
it will not close child menus and it will not close siblings at the same level in different menus
working on a proper patch, but considering our active project does not need this functionality anymore, it might be a while until I can find the time to finish this properly
I would however appreciate testing and feedback on this functionality
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | link.txt | 54 bytes | eltoneerkens |
| dhtml_menu.js_.txt | 3.9 KB | seutje |
Comments
Comment #1
phpsharma commentedThis Worked fine for me in 5.1.7
Comment #2
seutje commentedyeh, but I wanna work on implementing them as options and to add an option to select all the siblings (not just the ones in the same menu)
Comment #3
premanup commentedI've figured out no more jQuery slide effect for opening menu.
Comment #4
seutje commentedI'm sry... what?
are u trying to say this modification makes the menu's not slide anymore?
Comment #5
premanup commentedyes, I mean this modification makes the menu's not slide any more when it's opening. Closing menu works properly as original script provide.
Comment #6
seutje commentedthat's odd, I didn't even change anything about this line
just added handling for the siblings
does the original script make menu's slide open properly? although I don't rly see how anything could interfere
Comment #7
quinti commentedohs, thank u very much
That's exactly what I was trying to do,
very good,
thanks
Comment #8
seutje commentedhmm, lost track of this and now it seems a lil silly to backport
my apologies
Comment #9
eltoneerkens commentedAh.... I'm trying to use the dhtml_menu.js which makes sure that only 1 menu is open at a time. It's not working in my situation.
Could you please have a look 'Seutje' at this link. (see attachment) Hopefully you can help me with this. Thanks in advance!
Comment #10
seutje commentedthe link you provided uses http://78.157.195.41/~rubenbelli/rubenbellinkx_drupal/modules/dhtml_menu... which doesn't close direct siblings like the one at the top of this issue
Comment #11
eltoneerkens commentedThanks for your reply.
Hmm sorry, I replaced it over and over and lost track I think.
What I just did....
I copied the code from above but still it doesn't close the direct siblings. Is it the structure of my menu? Hope to hear from you.
Comment #12
seutje commentedhmm, looks like every tree is a separate menu, and wrapped in it's own ul:
instead of:
which is probably the reason it considers it to be 2 separate menu's
Comment #13
eltoneerkens commentedI switched to drupal 6. Thanks for your help.
Comment #14
seutje commentedwise move I'd say ;)
Comment #15
AjK commentedI had a D5 site that needed this functionality. Tried it out and did what it said on the tin. Thanks.
Comment #16
vuilI close this issue as Closed (outdated) because it has not update since 2009.