Score:1

Barrio Theme 5.5.10 Main Menu submenu does not output list items

tf flag

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>
    <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>
            <li class="dropdown-item menu-item--collapsed">
                    <a href="" title="Modules to extend EMTP" class="nav-link-">Modules</a>
              </li>
        </ul>
  </li>

Admin Blocks Main Menu Settings

 Main Menu dropdown

No Sub Menu

Greatly appreciated if anyone has an idea

unusedspoon avatar
aq flag
Have you edited the menu block and checked the settings there? As that also has controls on how many levels to show
Crystal avatar
tf flag
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!
Score:0
de flag
  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

Crystal avatar
tf flag
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 avatar
tf flag
Actually the number of levels was still 2 so I set it to 3 and now it works! thank you!!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.