Now that we have covered some of the general changes to the API in Drupal 7, we can begin looking at specific areas that have changed. Let's start by looking in more detail at how the menu system has changed in Drupal 7. The menu system is critical to making content appear on your site.
Let's begin by looking at some of the new hooks, which relate to the menu system, that you may want to implement in your module:
hook_menu_active_handler_alter(&$router_item, $path = NULL)
This hook allows you to change how a menu is handled by the module system. You can set the following keys within the router_item
array:
Property |
Description |
---|---|
Set to false if the user should not be allowed to access the path or true if they are allowed to view the path. | |
The path to a file that can be included before the | |
The callback to execute to generate the content of the path or perform needed... |