You are here

function theme_calendar_page_title in Calendar 5

Same name and namespace in other branches
  1. 5.2 calendar.theme \theme_calendar_page_title()

Theme the calendar page title.

Views defaults to displaying the title of the last argument in the view, rather than the View title or other values. Use this theme to override that behavior.

$view->build_type indicates whether this view is being rendered as a page or a block, use that to handle the title differently for each.

views_get_title() $context can be: 'page' - The title that goes with the last argument in $args. 'menu' - The value in View Menu Title.

or just use the values of: $view->page_title, $view->menu_title, $view->block_title.

1 theme call to theme_calendar_page_title()
calendar_views_post_view in ./calendar.module
Implementation of hook_views_post_view().

File

./calendar.theme, line 185

Code

function theme_calendar_page_title($view, $items, $output) {
  switch ($view->build_type) {
    case 'page':
      return views_get_title($view, $context = 'page', $args = $view->real_args);
    case 'block':
      return $view->block_title;
  }
}