Skip to content

Proposal for Enhancing the Navigation Block to Support Mega Menu Creation #61021

@nirav7707

Description

@nirav7707

Why we need ?

enhancing the core/navigation-submenu block to allow for the creation of mega menus within the Navigation Block.

Many websites feature extensive navigation menus with numerous links, often requiring linear menus that limit the number of items per row. This restricts the flexibility of design and organization. By expanding the capabilities of the core/navigation-submenu block to accommodate more inner blocks, users will have the ability to construct mega menus. This enhancement will enable users to categorize links more effectively and provide greater freedom in customizing the visual layout of the menu.

What need to update ?

  • Can create variation of the core/navigation-submenu but core/navigation-submenu uses the useInnerBlocksProps so can't able to manage the allowedBlock attribute value by filter so variation didn't work.
  • Update wp-content/plugins/gutenberg/packages/block-library/src/navigation-submenu/edit.js Edit function and add filter for core/navigation-submenu block. also can remove default block or move default block from edit function to block.json ( ref: Allow setting defaultBlock in navigation block #52610 )
  • Screenshot 2024-04-24 at 9 44 07 AM

Enhancement outcome:

Megamenu.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions