Custom Menus (tabs)
The menus module in Drupal core allows you to manipulate the system menus through the admin GUI interface (admin >> build >> menus)
However, it does not give you control over at least two key aspects of the menu:
- Access control - does not allow any specification of who can access the menu item;
- Tabbed menu - not possible to add or edit tab-style (local task) menu items;
These can be controlled if the menu is built programmatically. For these reasons, I created a custom lasqueti menu module (lasqueti_menu). This module does the following:
- Creates the menu items for this Design Notes book, and restricts access to only those who have 'access administration pages' privleges. Otherwise the Design Notes can either not be placed on a menu, or will show up to authenticated users on the site (in their personal menu - the Navigation menu).
An alternative would be to use the "menu-per-role" module, but this seemed overkill for hiding one book, and the module requires a core "hack", so not nicely maintainable.
- Creates the "tabbed" menu pages under the Primary Menu tabs. The module does two things of interest:
- creates the basic structure of the tabbed menu system;
- handle display of single node pages that appear on tabs, where required.
- handle display of teaser views that appear on tabs, where required.
See the following pages for more information about working with and maintaining these tabbed menus.