For the Calendar block on the side, the top title bar only shows the Month: I think it needs to show the Year (YYYY), both for the current one and any year that the user navigates to. Is there a way I could add this myself in its module files? Please advise. Thanks, Huj.

Comments

arlinsandbulte’s picture

Priority: Critical » Normal
Status: Needs work » Active

+1

Bitvark’s picture

Hi,
here is a solution:

You need to create your theme function (my_theme_name_date_nav_title()) overriding theme_date_nav_title() function in modules/date/theme/theme.inc

Just sobstitute my_theme_name with appropriate value and copy this function in template.php in your theme folder.

function my_theme_name_date_nav_title($granularity, $view, $link = FALSE, $format = NULL) {
 $format = ($granularity=='month') ? 'F Y' : NULL;
 $output = theme_date_nav_title($granularity, $view, $link, $format);
 return $output;
}

Drupal 7: See http://drupal.org/node/400292 - things may be different!

Bye
Bitvark

arlinsandbulte’s picture

Status: Active » Fixed

Solution provided....

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

marcotmarcot’s picture

Wouldn't this be better?

$format = ($granularity=='month') ? 'F Y' : $format;