Add a hook to allow for the customization of menus weight

Created on 24 June 2024, 6 months ago

Problem/Motivation

As far as I can tell, there is currently no simple way to dynamically alter the order in which the menus (stored in config 'menu_breadcrumb_menus') are handled during the building of the breadcrumb.

Proposed resolution

We could add a simple hook (perhaps in MenuBasedBreadcrumbBuilder::applies()) that would pass the menus array by reference to a hook implementation.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇫🇷France arousseau

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

Comments & Activities

  • Issue created by @arousseau
  • 🇫🇷France arousseau

    I added a very basic hook alter implementation. I'm not sure which cache needs to be invalidated (via a hook_update ?) after adding the module handler to the arguments of the 'menu_breadcrumb.breadcrumb.default' service.
    As it is, the patch/commit will result in an error if cache is not cleared after it is applied.

Production build 0.71.5 2024