Routing system

This guide describes the Drupal 8 routing system.

Routing system overview

High level overview of what the routing system is and how it works.

Introductory Drupal routes and controllers example

This is a quick introduction to routes and controllers in Drupal >8.

Structure of routes

Overview of required, and optional properties of a route definition.

Altering existing routes and adding new routes based on dynamic ones

Any route - whether statically defined in a YAML file, as seen in the introductory example, or a dynamic route as described in Providing

Providing dynamic routes

The simplest way to provide routes is to define them in a routing YAML file named after the module, as seen in the introductory example. Not

Routing-related objects: Route, CurrentRouteMatch, RouteMatch, Url

Route, CurrentRouteMatch, RouteMatch, Url are objects used for routing in Drupal 8.

Underlying functionality of the routing system in Drupal

The Drupal routing system builds a great deal on the Symfony framework. To define and use routes, you don't necessarily need to know the

Access checking on routes

You may specify permissions, roles and custom access checkers required to access the route.

Parameters in routes

The routing system allows supplying dynamic values as parameters to the controller, mostly through upcasting.

Guide maintainers

dmezquia's picture
Pancho's picture