Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Experimental project
This is a sandbox project, which contains experimental code for developer use only.
Allows developers to alter routes from yaml files.
To alter an existing route a new yaml file should be created in the module's
directory.
Example
If you want to alter the route for the node add page, to change the page title and the permission.
- Create a new file mymodule.routing.alter.yml
- Add the modified properties in the route.
node.add_page: defaults: _title: 'Add content - title modified' requirements: _permission: 'content contributor'
The other properties of the route will remain untouched.
IF two modules are altering the same route, they will be applied regarding to the module's weight.
Project information
- Module categories: Developer Tools
- Created by skipyT on , updated