You are here

function calendar_views_post_view in Calendar 5

Same name and namespace in other branches
  1. 5.2 calendar.module \calendar_views_post_view()

Implementation of hook_views_post_view().

Views automatically sets the page title to the value of the last argument. The calendar module has already created a proper title within the calendar, so override Views to set the page title to match the View title.

File

./calendar.module, line 962
Adds calendar filtering and displays to Views.

Code

function calendar_views_post_view(&$view, $items, $output) {

  // If no part of this view has calendar elements, exit.
  if ($view->build_type != 'page' || !calendar_is_calendar($view) || !calendar_has_calendar_args($view)) {
    return;
  }
  $title = theme('calendar_page_title', $view, $items, $output);
  drupal_set_title($title);
}