If you use the Drupal calendar module and wonder why the navigation links always link to the year 0000, there is a simple fix. Open up the file sites/all/modules/calender/theme/theme.inc and after this stanza (lines 19-23):
// Create the links to other displays.
$now = date_now();
$url = $view->get_url();
$view->date_info->url = $url;
$arg = $view->date_info->date_arg;
add the following line:
$view->date_info->year = $view->date_info->year && $view->date_info->year != $view->argument['date_argument']->options['wildcard'] ? $view->date_info->year : date_format($now, 'Y');
Hi mcmlxxii,
Thanks for that. Could you kindly tell me what change I should make in the D7 version (7.2 alpha) calendar to ensure that the glitch does not happen?
Thanks!
Varun
Thanks – I got it! Not very different. Only that $now should be changed to $current_date and should be placed at a later point, before the check for other variables