I need help with the Barrio Theme submenus. I upgraded our site to 5.5.10 to discover the menu has stopped working. In my attempt to figure this out, I recreated a test site locally and installed a Drupal 9.5.5 legacy-project and barrio 5.5.10.

The submenu is not outputting the listing of the submenu. The documentation says all parents must be expandable and they are. I dont know the system is ignoring the menu items.

Any ideas?

Code that outputs:

<ul class="clearfix nav navbar-nav">
 <li class="nav-item">
    <a href="/legacy/" class="nav-link nav-link--legacy- is-active" data-drupal-link-system-path="<front>">Home</a>
    <li class="nav-item menu-item--expanded dropdown">
    <a href="" title="EMTP Products " class="nav-link dropdown-toggle nav-link-" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Products</a>
        <ul class="dropdown-menu">
            <li class="dropdown-item">
                    <a href="/legacy/products/emtp" title="EMTP Software for transient analysis" class="nav-link--legacy-products-emtp">EMTP</a>
            <li class="dropdown-item menu-item--collapsed">
                    <a href="" title="Modules to extend EMTP" class="nav-link-">Modules</a>

Admin Blocks Main Menu Settings

 Main Menu dropdown

No Sub Menu

Greatly appreciated if anyone has an idea

  • Have you edited the menu block and checked the settings there? As that also has controls on how many levels to show Apr 6, 2023 at 10:19
  • Hi @unusedspoon, I have the settings as 'unlimited' but it does not work. I will try Shandesh's answer to see if it works. The issue is not just bootstrap actually because i switched to 'olivero' with the same problem. Thanks for your help!
    – Crystal
    Apr 25, 2023 at 17:55

1 Answer 1

  1. First make sure you have set the Number of levels to display as required(3 in your case). You can do it by visiting admin/structure/block/manage/Your_Theme_Machine_Name.

enter image description here

  1. Then check the Flyout style main menu option in your theme settings under Components > Navbar behaviour. You can do it by visiting admin/appearance/settings/Your_Theme_Machine_Name.

enter image description here

Explanation: The third level items are not showing because according the maintainer of the contrib theme bootstrap_barrio, that's how it is designed. Bootstrap Navbar by default supports only 2 levels of dropdown menu. You can read more about this issue here. https://www.drupal.org/project/bootstrap_barrio/issues/3133347#comment-14021486

  • 1
    Hi Sandesh, Thank you for this, I had 'unlimited' selected and switched to '3' but with both Olivero and bootstrap the third level does not output or render the submenu in the html. I am suspicious that it is a drupal core vs themes? I also have the nav bar set to flyout.
    – Crystal
    Apr 25, 2023 at 18:04
  • 1
    Actually the number of levels was still 2 so I set it to 3 and now it works! thank you!!
    – Crystal
    Apr 25, 2023 at 18:12

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.