You are here

function ds_extras_process_page_title in Display Suite 7.2

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

Page title options for a full entity page view.

1 string reference to 'ds_extras_process_page_title'
_ds_extras_theme_registry_alter in modules/ds_extras/includes/ds_extras.registry.inc
Implements hook_theme_registry_alter().

File

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

Code

function ds_extras_process_page_title(&$variables) {
  $page_title = drupal_static('ds_page_title');
  if (!empty($page_title)) {
    $variables['title'] = $page_title['title'];
    if (!empty($page_title['head_title'])) {
      drupal_set_title($page_title['head_title']);
    }
  }

  // Support for Views page title, currently only hiding the title.
  if (variable_get('ds_extras_vd', FALSE) && ($view = views_get_page_view())) {
    if ($layout = ds_get_layout('ds_views', $view->name . '-' . $view->current_display, 'default')) {
      if (isset($layout['settings']['hide_page_title']) && $layout['settings']['hide_page_title'] == 1) {
        $variables['title'] = '';
      }
    }
  }
}