You are here

function ds_extras_menu in Display Suite 7.2

Same name and namespace in other branches
  1. 7 modules/ds_extras/ds_extras.module \ds_extras_menu()

Implements hook_menu().

File

modules/ds_extras/ds_extras.module, line 11
Display Suite extras main functions.

Code

function ds_extras_menu() {
  $items = array();
  $items['admin/structure/ds/list/extras'] = array(
    'title' => 'Extras',
    'description' => 'Configure extra functionality for Display Suite.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ds_extras_settings',
    ),
    'access arguments' => array(
      'admin_display_suite',
    ),
    'file' => 'includes/ds_extras.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  if (variable_get('ds_extras_switch_field')) {
    $items['ds-switch-view-mode'] = array(
      'title' => 'Switch view',
      'description' => 'Switches a view mode inline.',
      'page callback' => 'ds_switch_view_mode_inline',
      'access arguments' => array(
        'access content',
      ),
      'file' => 'includes/ds_extras.pages.inc',
      'type' => MENU_CALLBACK,
    );
  }
  if (variable_get('ds_extras_vd', FALSE) && module_exists('field_ui') && module_exists('views')) {
    $items['admin/structure/ds/vd'] = array(
      'title' => 'Views displays',
      'description' => 'Manage your views templates.',
      'page callback' => 'ds_extras_vd_overview',
      'file' => 'includes/ds_extras.vd.inc',
      'access arguments' => array(
        'admin_display_suite',
      ),
      'type' => MENU_LOCAL_TASK,
    );
    $items['admin/structure/ds/vd/manage'] = array(
      'title' => 'Manage layout',
      'description' => 'Manage your views templates.',
      'page callback' => 'ds_extras_vd_manage',
      'file' => 'includes/ds_extras.vd.inc',
      'access arguments' => array(
        'admin_display_suite',
      ),
      'type' => MENU_LOCAL_TASK,
    );
  }
  return $items;
}