0

I am using a Bartik theme in drupal 7, and am trying to display a Page created using views under one of the Menu items. I've selected the "Show as expanded" for the parent item, however the child item is not appearing when I hover over the parent. Why would this be the case? How do I fix this?

I've displayed the same Menu in the sidebar, and there, it is displaying the child menu item. Also, I've tried disabling the css, and the drop down menu item is still not appearing...

1 Answer 1

2

Bartik theme is not designed by default to show parent items in Primary navigation section as expanded, even if you checked "Show as expanded" for each parent item in the main menu.

In order for you to make Bartik theme to render parent items and their children items; add the following code to template.php themes/bartik/template.php

function bartik_links__system_main_menu($variables) {
  $menu_name = variable_get('menu_main_links_source', 'main-menu');
  $menu_tree = menu_tree($menu_name);
  return drupal_render($menu_tree);
}

Note: make sure to clear Drupal cache once you apply the new changes.

3
  • Thanks @Aboodred1. The child item is now displaying, however all the styling is gone...
    – kine456
    Commented May 24, 2013 at 7:03
  • Wonder if it would just be easier to go with Nice Menus or Superfish. What do you think @Aboodred1
    – kine456
    Commented May 24, 2013 at 7:28
  • Nice Menus and Superfish are great options, but you still need to do some work to implement them and have them to work on Bartik theme
    – Aboodred1
    Commented May 24, 2013 at 13:40

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.