I am trying this with superfish but the menu options are expanded by default.

What would I need to do to get it to behave like it does in a menu (i.e. collapsed by default).

I want to use the menu drop down within the content (Edit i.e. within a panel or a block so that I can have drop-down menu functionality anywhere on the page (hence the tags).

  • 1
    some time back I did opposite of this, I had to chaneg menu items expanded by default.What I did was implementing hook_menu_link_alter() function hook_menu_link_alter(&$item) { $item['expanded'] = 1; } you can check if it works for you was well with some condition check for menu type and using $item['expanded'] = 0;
    – arpitr
    Sep 9, 2013 at 10:02
  • +1 @arpitr thank you - that's encouraging! I'll take a look and report back... Sep 9, 2013 at 10:08

2 Answers 2


The solution I chose in the end was to hand-code a drop down, based on the HTML markup output by a Views Exposed Filter form that I am already using (this also means that the look and feel is consistent).

So I created a block in the usual way and added the code shown below, and then in my 2-column minipanel added this block to the 2nd column and then added my minipanel to the panel page. The other column, 1st, of the columns contains the views exposed filter as discussed. See screenshots below, after the code:

<select name="field_type_value" class="form-select" onChange="document.location = this.value" value="GO">
<option value=""  selected="selected" disabled="disabled">Add something to our map!</option>
<option value="node/add/local-resource">person</option>
<option value="node/add/local-resource">organisation</option>
<option value="node/add/local-resource">project</option>
<option value="node/add/local-resource">wifi hotspot</option>

Other features in the code above:

Remaining thing to do:

widget not clicked on 1 of 2 widget clicked on showing dropped down


Check out the Menu Block module. It allows you to create a block that displays a menu, and it comes with a bunch of settings to control how the menu is displayed.

  • I have looked at this but it didn't do what I needed - as per my question. Or at least, I couldn't get to do that. I will re-visit it and try again but have tried several times already. But actually, it's not completely clear to me from the module description that is it going to do what I want: "So… have you ever used the Main and Secondary menu links feature on your theme and wondered “how the hell do I display any menu items deeper than that?” etc. Nothing about collapsing menu options - which is what I need to do, anywhere on the page. Sep 9, 2013 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.