Skip to main content
Beacon9.ca
interactive media for the web

Main menu

  • Home
  • Portfolio
  • Labs
  • Contact

Search form

Drupal Calendar Date Navigation

Today I was working on a Drupal site that involved having multiple calendars throughout different parts of the site. I used CCK's Date module, the Calendar module and Views to do this. One thing I found frustrating was that I couldn't create a custom view using the calendar module and keep the date navigation attachments (see this issue). This is a small tweak I came up with that adds links, at the theme level, to handle date navigation links as well as filtering by taxonomy term id.

Using the script

  • Upload the calendar-month.tpl.php to your active themes root folder.
  • Disable then re-enable your theme.
  • Style your links with CSS to make them look however you want!
File Attachment: 
calendarTweak.zip

Spread The Love

Tweet
  • Add new comment

Comments

Choy's picture

Great code, saved me alot of

Permalink Submitted by Choy (not verified) on Sat, 01/22/2011 - 16:39

Great code, saved me alot of headaches. Thanks!

Found a couple of bugs :

line 64 should be "$prevYear = $thisYear; "
line 69 should be "$nextYear = $thisYear; "

  • reply
jack's picture

Hi Choy - thanks for spotting

Permalink Submitted by jack on Mon, 01/24/2011 - 09:48

Hi Choy - thanks for spotting that! I've uploaded a new version including your changes.

  • reply

Add new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.

More information about text formats

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Email Facebook RSS

From the Labs

  • Drupal Social Popularity Module
    | 26 Nov
  • Drupal 7 Facebook Comments
    | 08 Nov
  • Drupal Mobile Redirect Module
    | 24 May
  • Drupal 7 Private Files Module
    | 30 Apr
  • Drupal 7 Sitemap Block Module
    | 11 Dec

View Labs

From The Portfolio

View Portfolio

Rank us on #rankable

Copyright © 2009-2010 BEACON9 All rights reserved. Admin Login Powered by Drupal