This module automatically adds a "destination" query parameter to menu links. This parameter points to the current page's URL, ensuring users are returned to where they were after navigating from a menu item.
Allows a site builder to configure menu links to automatically receive a destination query parameter pointing:
- Either to the
destinationquery parameter from the current page URL, if any, - Or to the current page URL if the URL contains no
destinationparameter.
Usage
Menu links defined in YAML files that should receive a destination query parameter, should add a destination: true property:
my_menu.link:
title: 'My link'
route_name: 'some.route'
menu_name: menu
destination: true
Links created with Menu Link Content (menu_link_content) module are also able to expose the destination as a query parameter. In the link add/edit form, a new Add a destination query parameter checkbox allows to automatically add the destination with the same effect as for YAML defined menu links.
Ask your assistant about Menu Link Destination
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.1 | Stable | 10–11 | May 30, 2024 |