Main menu

We’ve already seen how to hide a menu-item and change it’s tittle. Now I’ll show how to alter the permissions of an existing module.

This could be useful when we want finer grained control over the permissions we give to users.

Drupal comes with a lot of functionality ‘out of the box’. We add functionality by enabling modules. Sometimes tough, we do want to keep the functionality but we don’t want it to be displayed where the module displays it (in the menu).

For example, Drupal’s user module does a lot of nice stuff. One of those things is letting users log in, creating accounts and let them recover passwords without the side admin having to get involved. This is nice functionality. We want this. But we might not like that those “Create new account” and “Request new password” links are displayed on the “/user” page as seen below.

Subscribe to RSS - hook_menu_alter