You are here

function theming_example_menu in Examples for Developers 3.x

Same name and namespace in other branches
  1. 6 theming_example/theming_example.module \theming_example_menu()
  2. 7 theming_example/theming_example.module \theming_example_menu()

Implements hook_menu().

The Menu Example provides extensive examples for hook_menu().

Related topics

File

modules/theming_example/theming_example.module, line 75
Explains how a module declares theme functions, preprocess functions, and templates.

Code

function theming_example_menu() {
  $items['examples/theming_example'] = array(
    'title' => 'Theming Example',
    'description' => 'Some theming examples.',
    'page callback' => 'theming_example_page',
    'access callback' => TRUE,
    'access arguments' => array(
      'access content',
    ),
  );
  $items['examples/theming_example/theming_example_list_page'] = array(
    'title' => 'Theming a list',
    'page callback' => 'theming_example_list_page',
    'access arguments' => array(
      'access content',
    ),
    'weight' => 1,
  );
  $items['examples/theming_example/theming_example_select_form'] = array(
    'title' => 'Theming a form (select form)',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'theming_example_select_form',
    ),
    'access arguments' => array(
      'access content',
    ),
    'weight' => 2,
  );
  $items['examples/theming_example/theming_example_text_form'] = array(
    'title' => 'Theming a form (text form)',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'theming_example_text_form',
    ),
    'access arguments' => array(
      'access content',
    ),
    'weight' => 3,
  );
  return $items;
}