0

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

1
  • 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
    Commented Apr 29, 2014 at 13:36

2 Answers 2

1

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

2
  • 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 Commented Dec 30, 2012 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. Commented Jan 5, 2013 at 23:46
0

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 and acknowledge you have read our privacy policy.

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