Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rd level of primary menu doesn't get displayed #306

Open
alex-hsa opened this issue Jan 4, 2018 · 2 comments
Open

3rd level of primary menu doesn't get displayed #306

alex-hsa opened this issue Jan 4, 2018 · 2 comments

Comments

@alex-hsa
Copy link

alex-hsa commented Jan 4, 2018

We changed the max_depth variable to 3 in the template.php file and the HTML code for the 3rd level menu items is generated appropriately. However, we are unable to figure out what Javascript/CSS code triggers displaying the 3rd-level menu items. Can you help?

If there is any documentation that describes how to fix this please point us in the right direction.

Thank you very much,
Alex

@soniktrooth
Copy link
Contributor

Hi @alex-hsa

I don't believe Kalatheme's CSS supports more than 2 levels but it shouldn't be too hard to add in your custom theme if you want to. From what you described, it sounds like the nested markup is being printed, so you might want to look at the following examples to get an idea of how to do it:

@alex-hsa
Copy link
Author

Thank you @soniktrooth for your kind reply, which was very helpful.

I figured out that the menu is part of the Bootstrap theme and found various help on the web.

The solution I settled with had the following changes:

  1. Changed line Subtheme generation requires kalatheme to be default theme #215 of 'docroot/sites/all/themes/contrib/kalatheme/template.php'
    $main_menu_tree = menu_tree_all_data('main-menu', NULL, 3);
    (Replaced the number 2 with 3, so Drupal retrieves 3 levels for the main menu.)

  2. Added following styles to the main.css file

ul.nav .open > .dropdown-menu .dropdown > .dropdown-menu {
  position: absolute;
  top: 0px;
  left: 250px;
  display: none;
}
#header.navbar #navbar .dropdown.open .dropdown-menu {
  overflow-y: inherit !important;
}
ul.nav .open > .dropdown-menu li.dropdown:hover > ul.dropdown-menu {
  display: block;
  right: 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants