You are here

function custompage_ui_menu in Custom Page 6

Same name and namespace in other branches
  1. 7 custompage_ui/custompage_ui.module \custompage_ui_menu()

@file Custom Page Admin UI

File

custompage_ui/custompage_ui.module, line 8
Custom Page Admin UI

Code

function custompage_ui_menu() {
  $access = array(
    'administer custompage',
  );
  $items = array();
  $items['admin/build/custompage'] = array(
    'title' => 'Custom Pages',
    'description' => 'Theme content of your site differently depending on the URI.',
    'page callback' => 'custompage_ui_admin_settings',
    'access arguments' => $access,
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/build/custompage/list'] = array(
    'title' => 'List Custom Pages',
    'page callback' => 'custompage_ui_admin_settings',
    'access arguments' => $access,
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/build/custompage/add'] = array(
    'title' => 'Add a Custom Page or Block',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'custompage_ui_admin_settings_form',
    ),
    'access arguments' => $access,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/build/custompage/edit/%custompage'] = array(
    'title' => 'Edit Custom Page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'custompage_ui_admin_settings_form',
      4,
    ),
    'access arguments' => $access,
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/custompage/delete/%custompage'] = array(
    'title' => 'Delete Custom Page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'custompage_ui_delete_form',
      4,
    ),
    'access arguments' => $access,
    'type' => MENU_CALLBACK,
  );
  return $items;
}