I am looking to do something similar to the linked site below.
http://www.aspenmusicfestival.com/

I have followed the steps here https://drupal.org/node/1250714 with success. \

Now I would like to know if it is possible to control a block's output with the mini calendar.

The tutorial overrides

/**
 * Create the calendar date box.
 */
function template_preprocess_calendar_datebox(&$vars) {
  $date = $vars['date'];
  $view = $vars['view'];
  $vars['day'] = intval(substr($date, 8, 2));
  $force_view_url = !empty($view->date_info->block) ? TRUE : FALSE;
  $month_path = calendar_granularity_path($view, 'month');
  $year_path = calendar_granularity_path($view, 'year');
  $day_path = calendar_granularity_path($view, 'day');
  $vars['url'] = str_replace(array($month_path, $year_path), $day_path, date_pager_url($view, NULL, $date, $force_view_url));
  $vars['link'] = !empty($day_path) ? l($vars['day'], $vars['url']) : $vars['day'];
  $vars['granularity'] = $view->date_info->granularity;
  $vars['mini'] = !empty($view->date_info->mini);
  if ($vars['mini']) {
    if (!empty($vars['selected'])) {
      $vars['class'] = 'mini-day-on';
    }
    else {
      $vars['class'] = 'mini-day-off';
    }
  }
  else {
    $vars['class'] = 'day';
  }
}

where

$vars['url'] = 'events/' . $date;

is how the mini knows what to filter.

I would like to modify this so that not only is there a path involved but also block output. ??? make sense? and is this doable either in code or UI?

I tried to dpm($vars) in my template.php... (devel enabled :) but i get white screen so i can't really see what is going on with the block output.

Comments

Neslee Canil Pinto’s picture

Status: Active » Closed (outdated)