Drupal 6: Online Presentation of Data
Illustration by John Hersey

Planning with the calendar modules


Drupal 6: Online Presentation of Data

with Tom Geller

Video: Planning with the calendar modules

So far in this course, we have used dates twice, the first time was when we setup the People Content Type. There, we included a CCK field for the Date of Birth. The second time was when we set up the Event Content Type and used another CCK field to show when that event would take place. We then presented those dates in text format on the screen. But we don't usually look at dates in that form, do we? Now, we often find them easier to understand when we put them on a calendar. Fortunately, the author of the Date Module, Karen Stevenson has also written a really nice module to output date information in this calendar format.
Expand all | Collapse all
  1. 13m 21s
    1. Welcome
      1m 12s
    2. Reviewing requirements
      3m 35s
    3. Using the exercise files
      3m 36s
    4. Touring examples of data visualization
      4m 58s
  2. 27m 55s
    1. Planning data structure
      8m 26s
    2. Importing and manipulating data
      6m 39s
    3. Looking at Drupal's database
      6m 13s
    4. Deciding whether to store personal data as nodes or users
      6m 37s
  3. 1h 12m
    1. Understanding the Content Construction Kit (CCK)
      4m 57s
    2. Creating new content types with CCK
      7m 26s
    3. Hiding the Body field
      2m 46s
    4. Reflecting CCK field data in the Title field
      7m 28s
    5. Managing CCK field placement
      7m 32s
    6. Exploring CCK's other features
      8m 22s
    7. Using other CCK field types
      3m 25s
    8. Adding date information as a CCK field
      8m 43s
    9. Including images as CCK fields
      10m 23s
    10. Connecting content to existing nodes
      5m 58s
    11. Using taxonomies to categorize and group data
      5m 59s
  4. 53m 54s
    1. Understanding why views are useful
      6m 12s
    2. Using SimpleViews to create basic content views
      5m 49s
    3. Diving into the Views interface
      11m 16s
    4. Adding fields to a view
      7m 12s
    5. Understanding iconic controls in the Views interface
      7m 15s
    6. Surveying the Sort, Filter, and Field options in Views
      5m 40s
    7. Adding view displays as pages, blocks, and RSS feeds
      10m 30s
  5. 43m 48s
    1. Overriding default settings on view displays
      8m 56s
    2. Attaching more information to views
      10m 57s
    3. Improving view appearances with grid, list, and table formatting
      9m 20s
    4. Surveying other basic display settings in Views
      11m 3s
    5. Altering a view's appearance through CSS
      3m 32s
  6. 55m 0s
    1. Importing, exporting, and cloning views
      6m 9s
    2. Controlling access to views
      7m 19s
    3. Learning from built-in views
      5m 52s
    4. Creating views that aren't based on nodes
      10m 6s
    5. Extending views with arguments
      10m 9s
    6. Extending views with relationships
      7m 2s
    7. Going further with relationships
      8m 23s
  7. 46m 39s
    1. Understanding geographic data
      4m 25s
    2. Setting up the Location module
      16m 20s
    3. Entering geographic data with the Location module
      10m 10s
    4. Displaying basic maps with the GMap module
      6m 43s
    5. Integrating the GMap module with Views
      9m 1s
  8. 54m 21s
    1. Exporting data in tabular form
      11m 25s
    2. Planning with the calendar modules
      11m 31s
    3. Using the Charts module and Google Charts
      7m 11s
    4. Graphing data with Open Flash Chart
      4m 50s
    5. Making important data pop out with tag clouds
      7m 46s
    6. Putting it all together in an attractive package
      11m 38s
  9. 36s
    1. Conclusion

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now
please wait ...
Watch the Online Video Course Drupal 6: Online Presentation of Data
6h 8m Intermediate Jul 01, 2009

Viewers: in countries Watching now:

Drupal's built-in data presentation tools offer several ways for web designers to clearly and attractively package their data. In Drupal 6: Online Presentation of Data, Tom Geller explains how Drupal handles data so users can set up intelligent structures and implement them with Drupal's Content Construction Kit. Tom also shows how a data-driven web site can improve its interactivity by using geographic data to connect real-world addresses to maps. Exercise files accompany the course.

Topics include:
  • Importing and manipulating data in Drupal
  • Presenting date-formatted information in calendars
  • Understanding Drupal's data-query interface, "Views"
  • Improving view appearances with grid, list, and table formatting
  • Importing, exporting, and cloning views
  • Extending views with arguments and relationships
Tom Geller

Planning with the calendar modules

So far in this course, we have used dates twice, the first time was when we setup the People Content Type. There, we included a CCK field for the Date of Birth. The second time was when we set up the Event Content Type and used another CCK field to show when that event would take place. We then presented those dates in text format on the screen. But we don't usually look at dates in that form, do we? Now, we often find them easier to understand when we put them on a calendar. Fortunately, the author of the Date Module, Karen Stevenson has also written a really nice module to output date information in this calendar format.

Karen was also very involved in the development of the CCK module by the way, and the Calendar module integrates beautifully with both it and Views. We have already downloaded and installed the Calendar module. If you need any help doing so, see the section of my Lynda.com Drupal Essential Training course, expanding your site's capabilities with modules. Setting up calendars turns out to be a pretty complicated affair, but the good news is you don't have to do it from scratch. Included with the Calendar and Date modules are some built-in views.

All you have to do is go into those views and turn them on. In addition, the Date module we already installed includes a module called Date Tools that makes our job easier. Like most people who use these modules, we are going to take advantage of these tools rather than creating these calendar views strictly from scratch. The first thing we need to do is to turn on the modules. To do so, go to Administer, Site Building, and Modules, and then scroll down to the Date and Time Group. As you can see, there are a lot of date and time modules here. We are only going to turn on a few of them. We'll turn on Calendar and then scroll down, and turn on Date tools.

To understand what the rest of these modules do, see the documentation on drupal.org. But for us, that's all we need, so we'll scroll down further and click Save Configuration. Now that we have turned on the Modules, we are going to go through Date Tools and see exactly how it works. We'll set up a new content type using it, and we'll automatically setup a View along with some other nice things like Blocks that go along with that View. To do so, go to Administer, and then you will see Date Tools right here underneath Content Management. Click it, and that brings you to the Date Tools administrative page. Go up to the Tab and click on Date Wizard.

Here we get warned that we actually have to turn on another module. In my opinion, this is an error in the module's programming, because it should have told us this before we ever installed it, easy enough though. We go back to Administer, Site Building, and Modules, scroll down again until we get to that Date and Time group, and turn on that Date Repeat API, there. Now, scroll down, Save Configuration again, and go back to where we were. Once again, that's Administer, Content Management, Date Tools, and Date Wizard.

Good! Now, we are going to setup our new content type. Since we are going to throw this away later, I'm just going to call it temp_date. That's the machine-readable name, so of course you can only use underscores and not spaces. In fact, I'm going to leave all the other settings on their defaults. If you like, you can go back and obviously figure out how they work and what they give you. Scrolling down further, I click Save. What that did was it created a new content type and it also created this new view called calendar_temp_date. The one thing that the Date Tools module can't do is it can't save the view.

So in order to use this, you have to scroll down and click Save. We are not going to make any changes ourselves. Instead we'll take a look and see exactly what the default installation does. So we click Save and we now have our new view. Let's take a look at what it does. If you look along the displays here, you can see it installed a page and a block, and then it has a lot of other displays here. Let's just take a quick look at that page, by going up to this View Calendar page and right-clicking on it, or holding down the Ctrl key on the Mac to open up a new tab with that information.

We will go over to that Tab and voila! Now, I started recording this and adding notes to the site in March. So let's go back a little bit and see what's in our March calendar. There, we now have our new view called calendar_temp_date. Let's take a quick look at it. The first thing to look at is the first thing that we usually add to a view, which is the Filters. It's showing only nodes of the type temp_date that have been published. Let's take a look at that content type temp_date. To do so, go to Administer, Content Management and Content Types, and then click on the temp_date content type down here on the Manage Fields link.

As we can see, it's setup only one additional field, this Date field. We can of course create content of that content type as we usually do by clicking on Create Content and then going to the Content Type name, in this case Temp Date. You can see it's a title, a date, with a From and a To and a body, and that's pretty much it. We are not going to actually create any nodes of that content type. Instead, we are going to go back and edit the view to show some of those events we already setup. To do that, we go to Administer, Site Building and Views. Now we go back to our view, which was called calendar_temp_date, and we edit it.

We now have our view ready to edit, so that it reflects nodes of the content type event rather than that of temp_date. There are three things that you have to change, one is in the Filters group, another is in Fields, and the final is in Arguments. You might remember that the content type was called temp_date, and the date field was simply called Date. As you look at those three groups, you can guess that what they are. This one has temp_date that has to be changed to event. This one has date that has to be changed to event date or whatever we named it and the same is true in the Fields group.

Let's do that now. We first edit the Filter by clicking on Node: Type and scrolling down, changing it to Event, and clicking Update Default Display. The second thing we need to do again is in the Fields, I'm going to remove that Content: Date - From Date by clicking this Rearrange, and scrolling down and just deleting it by clicking on the Delete button. Once again, Update. We now have to re-add in the field that we want. Add the field here, scroll down a little bit until we get to the Content group down here. We have Date, Field Date, From Date, this is the one that we had before because of course the field was called simply Date. We have Date of Birth. That's not what we want.

We do have Date of Event. We'll use the From Date there and click add. I am going to simply leave the defaults here and see how that looks. We can change it later if we like. So Update Default Display, scrolling up again. You might remember how Arguments work. On a page, they show what section of data you are showing. If for example you had done Archives and you wanted to show all of the posts in the month of May, you would use an argument that said show me that month. Well, it's the same here. But right now it's filtering based on this Date field that we don't have anything in. So we click on that and scroll down. We have all of our usual Argument controls here, but we have quite a few more with the Date Module.

Down here, you can say what fields you actually wanted to filter on. I'm going to remove this one and add in Date of Event, From Date. Again, I'm going to leave everything else alone just to see what the defaults look like. Scroll to the bottom, and click Update Default Display. Now, we are ready to see what our calendar looks like. As always, you should scroll up and save before you go any further. That brings us back to our Calendar page. Let's take a look backwards just to make sure that it's not showing us for example the post date for those events. No, we posted in March and there is nothing there. Remember, the two events we had were in November of 2009, and one was in December, let's see.

We click ahead, and there it is. We now have a calendar showing those events. Incidentally, you can see the Arguments working by looking up in the Address Bar here, 2009-11. If we change that to 2009-12 manually like that, we see our December calendar just as we expect. Let's go back and take a look at that view by clicking Edit to see what else we can do with it. Well, it installed a block called Calendar Block. Let's take a look at that block. We do that by going to Administer, Site Building, and Blocks. Scroll to the bottom here, there is our Calendar Block.

Let's move that into the Right Sidebar just to see what it looks like. We do that, and click Save Blocks, and there it is. Let's go ahead to November or December just to see how it changes when there are events there. Again, I click ahead and as you can see, on a day when there is events, those dates will be underlined. If you click on that day, it brings you to a daily calendar, very flexible. Now, I showed you how to do this using Date Tools, but it's kind of a heavyweight solution. First of all, you can't delete the views that it creates.

They appear like the views we discussed in the video Learning from built-in views, so you can only disable them. Likewise, you can't delete the blocks it creates. So I'm going to briefly show you a more lightweight way of doing this. I won't actually go through the process, but it will give you an idea of another way to create calendars without all of this extra stuff. To do so, go to Administer, Site Building, and Views once again. Scroll down until you see this view Calendar. This is something that was installed by the Calendar Module. You would enable it, and then just clone it and name it whatever you want.

Once you are in there, again you could edit it just as I showed you. But as we have things now, the calendar is working beautifully. The last thing I'm going to do is remove that calendar block from here just for now. I go to Administer, Site Building, and Blocks, scroll down until I see that Calendar Block, and just move it to None and Save. Before we go, I want to mention one other way of displaying dates that I'm really excited about. Unfortunately, development of the Drupal Module isn't quite ready as I'm recording this video. I'm hopeful that it will be by the time you see it though.

There is already a stable version for Drupal 5 and it's just a matter of porting it to Drupal 6. It's called the Timeline Module and it takes advantage of some work at the Massachusetts Institute of Technology to create great displays. Let's take a look at a few of them. This page was created using the Timeline Widget. It's not actually in Drupal, but when you install it into Drupal, it looks very much like this. As you can see, it's a Scrolling Timeline. In this case, it shows events around JFK's death. If you click on any of the events, you get information from the node and in fact you could set it to go to that node. Another site that's using the Timeline Module is one from the government, recovery.gov.

This site interestingly is built on Drupal, although it's a very customized version of Drupal. If you scroll to the bottom, you will see again the Timeline, this time implemented in Drupal. We have gotten into some pretty deep waters here, and I think it's clear. We could spend hours wading through the complexities of the Date and Calendar Modules. We shouldn't blame their creators for the complexity though. I once heard Ms. Stevenson, the author of the Modules talk about how difficult it was to handle time-based data and it was simply mind blowing what with time zones, repeating dates, leap years, events that go from one date to another, so forth.

It's really amazing that these modules do as much as they do. And while the interface for the Calendar Module can be very intimidating, the tools that come with it will get you up in running quickly while leaving lots of room for later adjustments.

Find answers to the most frequently asked questions about Drupal 6: Online Presentation of Data .

Expand all | Collapse all
please wait ...

Q: The exercise files for the course appear to be missing.

A: Full exercise files for this course were not provided because of the unusually large amount of images, modules, and other files that would have to be installed in specific places, in addition to the database. We hope to have a solution for future Drupal courses that installs all items in their correct places.

Q: During the course the author makes reference to being able to add data via the exercise files; however, the data is not in the exercise files.
A: During the recording of the title, some of the exercise files were removed, since the frequent updates to Drupal itself and to the modules that are needed to run the exercise files cause them to break.

The data referenced in the video consists mostly of names and addresses, which will need to be typed by hand.
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.

Mark all as unwatched Cancel


You have completed Drupal 6: Online Presentation of Data.

Return to your organization's learning portal to continue training, or close this page.

Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.