I need one section of my sidebar menu to be expanded by default until user closes it. I tried to tick checkbox "Expanded" in menu settings for this section but it doesn't help.
For now I moved the section to a new menu/block and disabled dhtml feature and have it expanded, but this is no good.
Please advice.

Comments

silurius’s picture

Version: 6.x-3.4 » 6.x-3.x-dev

I have this same issue (6.x-3.5 and 6.x-3.x-dev). "Expanded" has never seemed to work for me, under any browser. Anyone have any idea where I might start troubleshooting, or is this a known limitation or bug? Thanks in advance.

silurius’s picture

paulberlin’s picture

the other issue is closed, yet i feel the complete issue is not resolved. I also need a menu item to start off expanded. yet the javascript solution given:

$(document).ready(function(){ var mId = 172-1; //the menu id which will be expanded $('#dhtml_menu-'+mId).parent().removeClass('collapsed') $('#dhtml_menu-'+mId).parent().addClass('expanded') $('#dhtml_menu-'+mId).parent().children('ul').show(); $('#dhtml_menu-'+mId).unbind('click'); $('#dhtml_menu-'+mId).attr("href", "#"); });

does not work for me. 172-1 being my menu id. it would be helpful to have an option to start a menu item expanded.

scott m. sanders’s picture

Subscribing; I need this too.

paulberlin’s picture

to start off with part of the menu expanded the solution i found was to simply make the link on the parent
item to <front> (being drupal's default path to home.) instead of it linking to a sub-page.

Doesn't work on the other 4 languages on my site, but is fine if you only have one language.

"sometimes the simplest solution is the correct one"

scott m. sanders’s picture

That does work if you just use default settings for DHTML Menu but not if you use any of these, so I've found:

  • Keep only one menu open at a time.
  • For the above option, consider each menu tree separately.
  • Close menus when their parent menu is closed.
vuil’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

The issue is outdated and I close it as Closed (outdated).