Settings at block level?

Created on 4 August 2025, 12 days ago

Hello, and thank you for this excellent module!

I'm curious if you've given any thought to managing/storing the module's settings at the block level β€” rather than on the menu itself β€” as the current implementation potentially limits re-use of a given menu structure.

For example, say I've got my site's main sections plus a couple levels of sub-links in the 'Main navigation' menu. In the site header, I might want to display that menu as a Top Link Disclosure Menu; but in the footer, I only want to display the first level of links (the main site sections) using the standard menu template.

Unless I'm missing something (which is totally possible!) to do this with the current implementation, I'd need to duplicate the menu to use different Accessible Menu settings.

✨ Feature request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

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

Comments & Activities

  • Issue created by @justcaldwell
  • πŸ‡¨πŸ‡¦Canada nickdjm

    I think adding some block-level settings through the UI would be a good improvement to the module!

    You can currently do this through code (not a great solution for site-builders, I know) since all of the settings are actually set at the block-level in the first place. We have a HOOK_preprocess_block() that adds everything about the menu into drupalSettings (including the constructor name for the type of menu you want to generate) and then the generator script takes it from there.

    I think the flow would be:

    • you set the default settings through the existing menu UI
    • you can override those defaults on the block level through the UI when you place a menu block through block layout, layout builder, etc.

    This would keep current functionality un-touched, while giving people the option to customize.

    The only other thought I would have about this would be: should it be a submodule that enables this for you? Should the default module just provide what's there now- and then you would enabled "Accessible Menu Blocks" or something to enable the ability to override. This would keep the functionality as simple as possible in the main module.

Production build 0.71.5 2024