You are here

function _ds_extras_menu_alter in Display Suite 7.2

Same name and namespace in other branches
  1. 7 modules/ds_extras/ds_extras.registry.inc \_ds_extras_menu_alter()

Implements hook_menu_alter().

1 call to _ds_extras_menu_alter()
ds_extras_menu_alter in modules/ds_extras/ds_extras.module
Implements hook_menu_alter().

File

modules/ds_extras/includes/ds_extras.registry.inc, line 11
Display Suite Extras registry file.

Code

function _ds_extras_menu_alter(&$items) {

  // Switch view mode.
  if (variable_get('ds_extras_switch_view_mode', FALSE)) {

    // Check if page manager is overriding.
    $skip_node_override = FALSE;
    if (module_exists('page_manager')) {
      if ($task = page_manager_get_task('node_view')) {
        if (isset($task['disabled']) && !$task['disabled']) {
          $skip_node_override = TRUE;
        }
      }
    }
    if (!$skip_node_override) {
      $items['node/%node']['page callback'] = 'ds_extras_node_page_view';
      $items['node/%node']['file'] = 'includes/ds_extras.pages.inc';
      $items['node/%node']['file path'] = drupal_get_path('module', 'ds_extras');
    }
  }
}