- examples
Demonstrates uses of the Menu APIs in Drupal.
The Page Example module also talks about the menu system, as well as how to use menu arguments to generate pages.
See also
hook_menu()
hook_menu_alter()
hook_menu_link_alter()
page_example
Functions & methods
| Name | Description |
|---|---|
| menu_example_arg_optional_load | Loads an item based on its $id. |
| menu_example_arg_optional_to_arg | A to_arg() function is used to provide a default for the arg in the wildcard. The purpose is to provide a menu link that will function if no argument is given. For example, in the case of the menu… |
| menu_example_id_load | The special _load function to load menu_example. |
| menu_example_menu | Implements hook_menu(). |
| menu_example_menu_alter | Implements hook_menu_alter(). |
| menu_example_menu_link_alter | Implements hook_menu_link_alter(). |
| menu_example_permission | Implements hook_permission() to provide a demonstration access string. |
| menu_example_user_page_title | Title callback to rename the title dynamically, based on user_page_title(). |
| _menu_example_basic_instructions | Page callback for the simplest introduction menu entry. |
| _menu_example_mappings | Utility function to provide mappings from integers to some strings. This would normally be some database lookup to get an object or array from a key. |
| _menu_example_menu_page | Page callback for use with most of the menu entries. The arguments it receives determine what it outputs. |
| _menu_example_simple_title_callback | Title callback to rewrite the '/user' menu link. |
File
- menu_example/
menu_example.module, line 8 - Module file for menu_example.