I have a menu which has a link to the homepage in it.

This link to the homepage has subItems. I was hoping for the menu item to expand and show the links of the lower lvl when i was at the homepage.

This does not happen. It does expand when i'm on one of the pages of the links of the lower lvl.

Is there any way i can expand this menu item when on the frontpage?

version: - drupal 7.14 - Menu 7.14

  • How are you adding the menu to your theme? Though code in a template file or using a block? If you add the menu via a block then the problem your describing should not happen. – Felix Eve Apr 29 '14 at 13:36

Go to admin/structure/menu/manage/[your-menu-name] and Enable the show as expanded checkbox in your parent menu item settings.

  • This is not what i want. That will make it so that it's always expanded, i only want it expanded when i'm on the homepage or one of it's sublinks – stefaan dutry Dec 30 '12 at 18:41
  • Currently i have made the workaround of using the show as expanded checkbox and just hiding the sub-level with jQuery when it's not supposed to be shown. This does mean that the you get to see the bar for a brief period of time and it then disapears in those cases. So i would still appreciate a better solution. – stefaan dutry Jan 5 '13 at 23:46

You can bypass this "issue" by creating a blank page with for example url index.html, then change front page address to index.html , then create your menu with top level pointing to index.html and it will show children elements after being clicked without any jquery manipulation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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