Is it possible to create dynamic menu items with ECA?

Created on 30 January 2025, about 1 month ago

Problem/Motivation

The Menu Token module is outdated and apparently not well maintained. It offered handy solutions to create dynamic menu items with the help of tokens.

I am searching for a similar functionality which is compatible with Drupal 10 and above. I have seen interesting solutions provided by the ECA module in the new Drupal CMS 1.0 to add menu links in Drupal's local tasks or alter the list of operation links. I wonder whether it would also be possible to add a dynamic menu item to any menu of a website.

Consider the following use case. A site administering different journals has a Main menu in which the routes of "About", "Submit an article" or "Issues" menu items would be dynamically altered based on the journal in question, on the current location of the user browsing the site. When the user is browsing content related to a particular journal, the menu would list the About, Submit an article and Issues menu items related to that particular journal. The dynamic part may come from the url, or other available tokens (logged in user, etc.).

Thanks for any ideas helping to achieve this.

💬 Support request
Status

Active

Version

2.1

Component

Documentation

Created by

🇮🇪Ireland marksmith

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

Comments & Activities

  • Issue created by @marksmith
  • 🇩🇪Germany jurgenhaas Gottmadingen

    This is an interesting use-case. I'd love to find a solution in ECA for this or, if necessary, build new features to make it possible. Right now, I have no idea how we could make this possible, but we should work on it.

Production build 0.71.5 2024