Mega Menu in Header region not expanding children.

Created on 11 August 2025, 8 days ago

Problem/Motivation

If a move the Main Navigation (set to Mega Menu) into the Header region : the Mega Menu only shows top entries. And the children are not expanding on mouse over or on click.
Inside the Primary Menu region everything works fine.

(I can't say if it is a bug or a feature...)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇹Austria maxilein

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @maxilein
  • 🇦🇹Austria maxilein

    Thinking about it: I see that all settings regarding the menu are region based.

    Would it be possible to make the primary menu settings - menu based in order to make menus work in any region?
    For instance a checkbox that selects menus that should have the settings as in Primary menu region - but then they work like that in any region?

  • 🇺🇸United States flashwebcenter Austin TX

    Hello,

    I understand the idea, and it’s technically possible to make menu settings apply to any menu in any region. However, I don’t recommend adding this to a contrib theme because it greatly increases the risk of bugs.

    When you allow a component to work in any arbitrary placement, you lose control over the surrounding markup, CSS, and JavaScript context. That means it’s impossible to guarantee that all features will work smoothly in every scenario. But in any private work, it’s fine to do because you’re dealing with one known environment, where you can fully control and test the outcome.

    In a contrib theme, stability and predictability are critical, opening the placement too much can cause unpredictable behavior and break existing sites.

    That’s why, in Solo, all custom features are tied to specific regions. This ensures they function exactly as intended, with the HTML, CSS, and JS environment they were built for.

    Solo ships with four dedicated Twig menu templates that are designed for different regions:

    • menu--primary-sidebar-menu-template-click.html.twig
    • menu--primary-sidebar-menu-template-hover.html.twig
    • menu--responsive-menu-template-click.html.twig
    • menu--responsive-menu-template-hover.html.twig

    If you need similar behavior for a menu in a different region, you can simply copy one of these templates to your sub-theme and rename it to match your target region or menu name. This approach keeps the theme stable while still allowing customization.

    Best wishes,
    Alaa

  • 🇦🇹Austria maxilein

    Thank you very much!

Production build 0.71.5 2024