You are here

function template_preprocess_calendar_mini in Calendar 7.3

Same name and namespace in other branches
  1. 8 calendar.theme.inc \template_preprocess_calendar_mini()
  2. 6.2 theme/theme.inc \template_preprocess_calendar_mini()
  3. 6.2 calendar_multiday/theme/theme.inc \template_preprocess_calendar_mini()
  4. 7 theme/theme.inc \template_preprocess_calendar_mini()
  5. 7 calendar_multiday/theme/theme.inc \template_preprocess_calendar_mini()
  6. 7.2 theme/theme.inc \template_preprocess_calendar_mini()
  7. 7.2 calendar_multiday/theme/theme.inc \template_preprocess_calendar_mini()

Display a mini month view.

File

theme/theme.inc, line 79
Theme functions for the Calendar module.

Code

function template_preprocess_calendar_mini(&$vars) {

  // Add in all the $vars added by the main calendar preprocessor.
  template_preprocess_calendar_month($vars);
  $view = $vars['view'];

  // Make sure that the calendar title links go to the month view,
  // not the year view (if this is embedded in a year display).
  $view->override_path = calendar_granularity_path($view, 'month');
  $view->date_info->show_title = !empty($view->date_info->show_title) ? $view->date_info->show_title : FALSE;
  $vars['show_title'] = $view->date_info->show_title;
  $vars['view'] = $view;
}