O'Reilly logo

Drupal 7 Module Development by Ken Rickard, John Wilkins, Larry Garfield, Matt Butcher, Greg Dunlap, Matt Farina

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Drupal menu system

Drupal's menu system is deceptively named. The name implies that it is responsible for the navigation of your site, and while this is true it does a great deal more. At its core, the menu system is responsible for mapping Drupal paths to the functions that generate the contents of the requested page. The menu system is also responsible for controlling access to Drupal pages, acting as one of the central gatekeepers of Drupal security.

Drupal module developers can map paths to Drupal functions by implementing hook_menu(), which adds paths to the menu system, assigns them access rules, and optionally creates navigational elements for them.

Defining a page callback with hook_menu

For our module we will need to implement two new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required