Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in

Breadcrumb

  1. Home

Routing

By admin, 7 April, 2024

Understanding Routes in Drupal

In Drupal, a route represents an association between a URL and a controller that handles requests to that URL. It determines which controller (or handler) should be invoked to handle a user request to a specific URL.

Routes in Drupal are declared in a *.routing.yml file, which is typically located in the module or theme folder. This file defines the URLs (paths), controllers, and other parameters such as access permissions, request parameters, etc.

Example of a route declaration in mymodule.routing.yml file:

Tags

  • #Drupal Planet
  • Routing
Routing
Powered by Drupal