Smart Menu Links Improve Drupal Event Platform with Configurable, Context-Aware Navigation
Martin Anderson-Clutz has introduced Smart Menu Links, a new approach to site navigation designed to enhance the flexibility and automation of the Drupal Event Platform. The feature allows site builders to create dynamic links that adapt to the current context of the site, such as linking to content for a specific year or event without manual configuration.
Smart Menu Links address a challenge common to event-driven sites: how to generate navigation that remains relevant as users move through different versions or instances of an event. Rather than manually creating separate menus or hardcoded paths, Smart Menu Links extracts contextual information like event IDs or taxonomy terms from the current URL and uses it to generate accurate links automatically. This mirrors the dynamic filtering used in Views and ensures navigation always points to the correct content, such as sessions or sponsors tied to a specific event.
Initially implemented using custom classes that extend Drupal’s core, 'MenuLinkDefault'
, the solution was further developed into a more reusable system by introducing configuration-based menu link generation. This allows site owners to define Smart Menu Links through configuration entities, reducing the need for custom code and opening the door to broader use within Drupal recipes.
To manage link visibility, Martin integrated logic that checks workflow states associated with events. Using Drupal's `isEnabled`
method, links can now be conditionally displayed based on where an event is in its lifecycle, such as “Open for Sessions” or “Schedule Published.” This approach allows navigation to adapt as events progress, providing a smarter user experience.
Caching and validation also received attention. Smart Menu Links include URL segment validation to ensure that links behave correctly based on user location within the site. Future enhancements include refining cache contexts to reduce overhead and improve performance.
These improvements are part of a broader effort to evolve the Event Platform into a more modular, recipe-based architecture aligned with Drupal’s direction. The ultimate goal is a system where complex functionality like session scheduling and menu generation can be easily deployed and adapted through configuration.
Community members are invited to test Smart Menu Links, share feedback in the #event-platform channel on Drupal Slack, and attend a live demonstration at MidCamp 2025.