You are here

Example: Menu API in Examples for Developers 6

Same name and namespace in other branches
  1. 7 menu_example/menu_example.module \menu_example

Examples using Menu API. (drupal 6)

Demonstrates uses of the Menu APIs in Drupal, including hook_menu(), hook_menu_alter(), and hook_menu_link_alter().

This example is part of the Examples for Developers Project which you can download and experiment with here: http://drupal.org/project/examples

Parent topics

File

menu_example/menu_example.module, line 9
Demonstrates uses of the Menu APIs in Drupal, including hook_menu(), hook_menu_alter(), and hook_menu_link_alter().

Functions

Namesort descending Location Description
menu_example_arg_optional_load menu_example/menu_example.module Load an item based on its $id.
menu_example_arg_optional_to_arg menu_example/menu_example.module 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 menu_example/menu_example.module The special _load function to load menu_example.
menu_example_menu menu_example/menu_example.module Implementatation of hook_menu().
menu_example_menu_alter menu_example/menu_example.module Implements hook_menu_alter().
menu_example_menu_link_alter menu_example/menu_example.module Implements hook_menu_link_alter().
menu_example_perm menu_example/menu_example.module Implements hook_perm() to provide a demonstration access string.
menu_example_user_page_title menu_example/menu_example.module Title callback to rename the title dynamically.
_menu_example_basic_instructions menu_example/menu_example.module Page callback for the simplest introduction menu entry.
_menu_example_mappings menu_example/menu_example.module 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 menu_example/menu_example.module Page callback for use with most of the menu entries. The arguments it receives determine what it outputs.
_menu_example_simple_title_callback menu_example/menu_example.module Title callback to rewrite the '/user' menu link.