You are here

function views_content_get_display_title in Chaos Tool Suite (ctools) 7

Get the title to display for a views content display for pane or context.

4 calls to views_content_get_display_title()
views_content_context_view_settings_form in views_content/plugins/contexts/view.inc
views_content_views_panes_content_type_admin_title in views_content/plugins/content_types/views_panes.inc
Returns the administrative title for a type.
_views_content_get_context_from_display in views_content/views_content.module
Get the child plugin for a view context display.
_views_content_panes_content_type in views_content/plugins/content_types/views_panes.inc

File

views_content/views_content.module, line 190
Provides views as panels content, configurable by the administrator. Each view provided as panel content must be configured in advance, but once configured, building panels with views is a little bit simpler.

Code

function views_content_get_display_title($view, $display_id, $option = 'pane_title') {
  $handler = $view->display[$display_id]->handler;
  $title = $handler
    ->get_option($option);
  if (!$title) {
    if ($handler->display->display_title == $handler->definition['title']) {
      $title = t('View: @view', array(
        '@view' => $view
          ->get_human_name(),
      ));
    }
    else {
      $title = t('View: @view: @display', array(
        '@view' => $view
          ->get_human_name(),
        '@display' => $handler->display->display_title,
      ));
    }
  }
  return $title;
}