Olivero: Support second-level navigation submenus on secondary menu

Created on 1 February 2021, about 4 years ago
Updated 6 November 2022, over 2 years ago

Problem/Motivation

We would like to have expandable menu item where we like

Steps to reproduce

1-Add a sub-menu under the default "My Account" item of the "User account menu" menu (make sure to use an item from the "User account menu" not the "Main Menu"
2-Make sure that the parent of the newly created menu item is set as "Show as expanded" and make sure that the block containing this menu have the proper options to display it as expanded (option "Number of levels to display").

Result:The two menu items are stacked one on the other... The arrow to expand it is missing.

Proposed resolution

Here is a first hint:
If I replace the code of templates/navigation/menu.html.twig (which is displaying the staked menu items) by the code of templates/navigation/menu--primary-menu.html.twig Then the behavior of the menu becomes what was expected.

Conclusion 1: it looks like the problem is coming from templates/navigation/menu.html.twig

Conclusion 2: Maybe there is an additional problem because the padding and the position of the expanded menu of the "Main Menu" is not the same as the one of the "User account menu"
See the padding/position of the menu item in the following capture and compare with the upper screenshot:

Feature request
Status

Needs work

Version

10.1

Component
Olivero 

Last updated about 16 hours ago

Created by

🇧🇪Belgium DuneBL

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update almost 2 years ago
    Patch Failed to Apply
  • 🇺🇸United States w01f

    Same issue as original poster - don't understand why this functionality was built into the primary menu, but not the secondary...

    You don't have to use it. You can keep the user menu as simple as you want. But having it be a hassle to duplicate something already present by default in the other menu is a pain. I'm currently seeing how I can override the menu--secondary-menu.html.twig file to have the same button wrapping hoping that does the trick.

    Or maybe it'll be easier to create a custom user menu and just replace the default one? Obviously neither solution is ideal for such a relatively low weight "feature" (when it already exists literally next door).

    In response to Mike's #21 Olivero: Support second-level navigation submenus on secondary menu Needs work ...why not? Please provide some rationale/background. Accessibility? Potential for confusion? I'm reaching here trying to understand. We absolutely appreciate the enormity of hard work and amazing innovation/triumphs of the new themes and the teams that have bled for these. Personally, I'm using them everywhere on every site I have. But "we don't currently support" by itself, with no context, in any context, is a non-answer, doesn't engage the community, and ultimately disserves the amazing work you've already done. #everythingsharedwithlove

  • 🇩🇪Germany ThuleNB

    I have the exact same problem than the original poster. I assumed this to be possible and after unsuccessfully trying to make it work I started to google where I came across this issue. I really like the Olivero theme but this doesn't make sense.

Production build 0.71.5 2024