Add config action for StaticMenuLinkOverrides::saveOverride()

Created on 18 August 2022, over 2 years ago
Updated 28 June 2024, 6 months ago

Problem/Motivation

Static menu link overrides are commonly overridden in install profiles, making them a candidate for a config action.

For example, core's standard install profile includes such an override.

Proposed resolution

Expose a config action for StaticMenuLinkOverrides::saveOverride().

Sample action:

  actions:
    core.menu.static_menu_link_overrides:
      saveOverride:
        contact__site_page
        -
          menu_name: footer
          parent: ''
          weight: 0
          expanded: false
          enabled: true

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: won't fix

Version

11.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada nedjo

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    Is this needed now that recipes can provide default content? It feels like something custom install profiles had to do that we no longer have to.

  • Status changed to Closed: won't fix 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    Menu links can be provided by default content. So we can achieve the same outcome without introducing more code. I am closing this as Won't Do. Please feel free to re-open if you disagree.

    Using the default_content module, you can export menu links to a recipe.

    # All menu links
    drush dcer menu_link_content --folder=/path/to/recipe
    
    # A specific menu link (Menu link ID 342 is the example)
    drush dcer menu_link_content 342 --folder=/path/to/recipe
    
Production build 0.71.5 2024