Posted by mbeenon on January 4, 2009 at 2:57am
I have turned one of my vocabularies into a dhtml drowdown menu.
On the home page, it is expanded, on some others, it is collapsed.
I'd like for it to be collapsed by defualt on all pages.
I cannot find a way to change those settings.
Thanks.
Comments
Hi mbeenon - are you using a
Hi mbeenon - are you using a module to make the menu? I'd need more information on how the menu is built to know how to help.
I was using dhtml menus
I have removed the module all together due to functionality issues.
for instance, i had turned one of my vocabularies into a menu using taxonomy menus module. which basically adds a menu with the rest of the menus ie.primary, secondary ... category
by default, in the menu settings, i had it's default state collapsed.
i pin-pointed the issue down to this:
whenever i had a body class of "front" it would be expanded, no matter what settings i tinkered with.
whenever the body class was "not-front" it would function properly and remain in the state it was on the previous page..
dhtml menu provides some cookies that remember the state of the menu when you navigate away to another page containing that menu, and when the new page loads, the menu remains in the state you left it. This only worked when the body class of the page was "not-front"
if you navigated to a page with a class of "front" it would always be expanded, regardless of the state it was on the previous page.
I just wanted the menu to be collapsed by default on the home page. no matter what, it would always be expanded. getting in the way of other thing.
second issue: using advanced taxonomy blocks and quick tabs (my alternative to the drop down dhtml menu)
i have a quick tab block, one of the tabs being my advance taxonomy block, and in it, obviously a list of terms.
dhtml turned those terms into parents (which i did not want) resulting in an arrow that pointed downward when u click on the term (as if it is dropping down a menu) which wasn't visible.
so i disabled that particular menu in the dhtml menu settings, hoping that when u clicked on the term, it would bring you to that page. instead of dropping down an invisible menu. but DIDNT work. dhtml just didnt listen
so i had anough and disabled dhtml menu altogether. my terms are links now, not parents.
Matt Bannon
Having the same issue
Tried working with theme_menu_item() to make the default class of all menus "collapsed", but it didn't seem to do anything. I'm in the "deep end" with respect to theme functions, so it could be that I'm not understanding the PHP correctly (though I know how to implement theme functions from template.php). Also using DHTML menus module... Any help would be hugely appreciated!
I know this thread is far
I know this thread is far dead, but if anybody searches this, might as well have some sort of response.
If you want your DHTML menu collapsed by default, you could do this sort of hacky thing on the CSS side and just select the nested menus and hide them by default (make sure you make those nested menus accessible when parent node is chosen, for example).
ex: #someDiv ul.menu ul.menu {display:none}
It works, but it's not really an ideal solution. What do people think?
TJ