In this video, we'll install and enable the Calendar module and all its dependencies. Then, we will create a new calendar view from a template.
Install Modules
Enable Modules
-
Go to "Modules" (admin/modules) and enable:
- Chaos Tools
- Calendar
- Date Views
- Views
- View UI
-
(Save configuration)
Now that we have installed and enabled all of the modules that we need, let's create the calendar view. We could always build a calendar view from scratch but the recommended and easiest way to do it is to start with the template.
- Go to “Structure => Views => Add view from template” (admin/structure/views/add-template)
You'll see a variety of templates that can be created.
- Name: Calendar
- Description: A calendar view of the 'field_event_date' field in the 'node' base table.
- Click "add"
- View name: Calendar (Choose a name for your new Calendar view)
- (Continue)
Scroll down to see the Calendar view with our content inside in the live preview. And all we have to do is save the view.
- (Save) (Save the view)
Let's take a look at the calendar by clicking "View Month". (I'll open it in a new tab.) Here, you'll see that we've got tabs for Month, Week, Day and Year filled in with the content that we created in the last video. We can see the different displays of the Calendar view by using these tabs. We also have Previous and Next tabs that we can use to go back and forth through the months, weeks days or years. And if you're displaying the "Navigation" block, there will be a new link in the navigation menu to the Calendar page.
In the next video, we are going to dive into the settings of this calendar view and make modifications like changing events to display only the start time, shortening the unnecessarily long URLs, and filtering to only display certain types of content.