Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hey,
I'm quite new to drupal and use bootstrap theme 7.x-3.0 for the first time.
I run in an issue I can't solve.
I created an standard menu which has 3 levels:
Main link, first level (shown)
-- sublink, second level (shown)
--- sublink, third level (not rendered)
--- sublink, third level (not rendered)
Only the first two levels of the main menu get rendered, third level I miss totally.
Has anyone an idea how to solve this?
Thx in advance
Comments
Comment #1
lodey CreditAttribution: lodey commentedYep - second that problem.
The menu item definitely isn;t rendering in the DOM, and if we switch to the bootstrap parent theme the same problem happens. If we switch to a different theme the menu works.
We haven't been able to find the source of the problem yet. Anyone else spotted this issue?
Comment #2
lodey CreditAttribution: lodey commentedWe ended up finding this thread - https://drupal.org/comment/7169716#comment-7169716
Dropping those theme functions into our template.php worked. It would be nice to see more menu control in the theme tbh - I would prefer to just turn on the bootstrap menu systems when needed.
Comment #3
joshuautley CreditAttribution: joshuautley commentedWould be nice to see this solution integrated into the theme...
http://bootsnipp.com/snippets/featured/multi-level-dropdown-menu-bs3
Comment #4
markhalliwellScripted response: This issue has been closed while cleaning up the issue queue.
Comment #5
ConradFlashback CreditAttribution: ConradFlashback commented+1
Comment #6
ipwa CreditAttribution: ipwa commentedNice solution in child theme template.php: http://www.drupalgeeks.com/drupal-blog/how-render-bootstrap-sub-menus
Comment #7
parimal.jariwala CreditAttribution: parimal.jariwala commented#6 did the trick. This did exactly what I was looking for.
Thanks ipwa.
Comment #8
TarKHaoS CreditAttribution: TarKHaoS commentedSolution #6 works like a charm!
Comment #9
GoddamnNoise CreditAttribution: GoddamnNoise at Karakana Factoría TIC commentedSorry for adding comments to a closed thread, but this is the most focused thread i've found about this problem.
The solution in #6 works, but it doesn't work properly on mobile. If you shrink your browser window to force the mobile version to show up, then the behavior of the menu items is different: the first level menu items are drop-down menus, but the second level menu items with children items are hover-down menu items. Any ideas to make those second level menu items dropdown menus too and get a consistent behavior for all the menu items in the mobile version?.
Comment #10
markhalliwellNo.
That's why Bootstrap took support for sub-menus out of the framework: it doesn't work well with mobile.
It's also why #1893532: [bootstrap][policy][7.x-3.x] Navigation/Menus has been sitting there forever. You'll some more solutions in that issue, but suffice it to say: if you have to "drill down" a site's nav... you're doing it wrong.
Comment #11
GoddamnNoise CreditAttribution: GoddamnNoise at Karakana Factoría TIC commentedThanks a lot for your answer, markcarver, I'm a Bootstrap newbie and didn't know about that.
Comment #12
mariami.ta CreditAttribution: mariami.ta commented#6 Solution, Worked Great!!Thanks a lot!!!
Comment #13
tiernosbah@gmail.com CreditAttribution: tiernosbah@gmail.com as a volunteer and commented#6 doesn't work for me.
Drupal 8.3.6
URL: www.webameriqa.com
Here is the list of the main menu where submenu level 3 is not showing
Comment #14
hardik jayeshbhai hihoriya CreditAttribution: hardik jayeshbhai hihoriya as a volunteer and commentedon my side overwrite main--menu.html.twig in drupal 8
level 1 & level 2 & level 3
Comment #15
rex.barkdoll CreditAttribution: rex.barkdoll commentedfor #14, I'm seeing the sub-UL elements outside of the top level LI items rather than nested inside them.
Seeing:
< ul>
< li>< /li>
< ul>< li>< /li>< /ul>
< /ul>
Comment #16
stavroch CreditAttribution: stavroch commentedWhat about Drupal 7?
Comment #17
mmaldonado CreditAttribution: mmaldonado as a volunteer commentedSolution #6 works for me in D7 in boostrap version = "7.x-3.26",
Thanks
Comment #18
igonzalez CreditAttribution: igonzalez commented#6 D7 doesn't work properly on mobile
Comment #19
wdev CreditAttribution: wdev commentedBy default, the Bootstrap theme for Drupal 8 shows the first level items only, so you have to "tell" the theme that you need more levels. This is the procedure that usually works for me:
logged in as administrator, click Structure > Block Layout
locate the Block corresponding to your menu (e.g. "Main navigation" in the Navigation region) and click [Configure]
from the configuration page, set the "Number of levels to display" to the max number of levels you plan of displaying to users, including the initial level
After saving your changes you should see the inner levels of your menu.
then in css :
Comment #20
jswetnick CreditAttribution: jswetnick commentedWhere (in which dir/file) should I change the default Bootstrap Barrio Drupal sub-theme styling (CSS) for my Menu UI? The last person to comment did not say where to add his custom CSS. Also, I changed the Navigation Block config to display 3 levels, so I now see the caret denoting another expandable menu level, but when I select that control menuitem, nothing happens -- the 3rd level dropdown menu still does not render/is not expanding. I hope someone has a fix.