Hi everybody and welcome to an alternate Daily Dose of Drupal. Today we’re on Episode Number 155 and we’re going to be heading over the Calendar Module. In case you’re not acquainted with the Calendar Module, it basically permits you to construct an Event Calendar that has month, week, day or even year sees for the datebook itself.
Before we begin I am Shane Thomas, you can tail me on Twitter @smthomas3, likewise feel free to take after Adam Learing on Twitter too since he’s been doing a considerable measure of Code Karate features recently. We do have a digital book turning out soon, its advancing and make a point to sign up for the bulletin in the event that you haven’t as of now. We do like the take after there. We’re feeling free to begin.
The principal thing we have to do is verify we have all the date modules downloaded, well its one date module I figure that you can download one undertaking from drupal.org however a different modules that you really need to empower and you’re going to need the Date API, we’re utilizing the Date Pop-Up, you’ll require the genuine Date Module itself and Date Views for to take after alongside this sample.
The following thing is to verify you have the Calendar Module empowered; I might feel free to empower this at this moment. The way the Calendar Module meets expectations is that it basically … it can utilize a substance sort … it can utilize different sorts of elements too yet we’re feeling free to simply remain faithful to Nodes for this sample and it utilizes a Date Field on that substance sort. So we’re feeling free to include another substance sort and we’re going to call this Event, we’ll the title Event Title and we’ll practically leave everything as default.
So we’re going to click Save and Add Fields and we’re going to include an Event Date Field, I’m going to select Date and we’ll make it a pop-up logbook and we’ll click Save. We next need so select what Date Attributes we need to gather. Since we’re doing a logbook we’re going to need to have Week and Day Views.
We’re feeling free to gather these up as the minute progressed, we don’t need up to the second. We’re additionally going to offer an In-Date yet not so much oblige it. That permits us to set a particular span for the occasion. We’ll utilize the site’s chance zone taking care of and we’ll leave everything else the same and click Save. We simply affirm that everything is the thing that you require, you can include some help content, click Save Settings and this will bring us again to the genuine oversee fields.
I’m feeling free to draw the date up here simply to make it a little simpler and we’re feeling free to include only two brisk occasions. So we’ll call one Event 1 and we’ll feel free to select June ninth, we’ll go from 7:15 to 9:15 for the first occasion, we will snatch some content to add to the body and we’ll click Save. We’ll then include one all the more snappy one, we’ll call this Event 2 and we should not gather an End Date here. We will simply go to June tenth and say 11 o’clock and we won’t have an end date. We can additionally get some content and glue it in and there we go. We have our two occasions made with our dates set. The following step is to obviously assemble our datebook.
The Calendar Module is all based off of Views so in case you’re acquainted with Views some of it is going to be second nature however it is a tiny bit diverse.
There’s a couple of extra choices and a couple of diverse things you have to take a gander at. So on the off chance that you go to the Structure Views page you’ll see there’s an Add View from Template. You’re going to need to click that and that is going to provide for you an arrangement of layouts to utilize. It’s all focused around the Date Field you made so you’re going to need to discover your date field and for this situation Field Event Date and utilize that layout. So you’re feeling free to click Add on the Date Field that you need to use for your schedule, you can provide for it a name, we’ll feel free to keep logbook and you click Okay there now you’ll have what’s really natural, recently an ordinary Views page.
You can see there’s a month, week, day and a year online visit. These are all … these initial four are Page Views, there’s additionally a piece and an approaching occasions square. So we’re feeling free to simply continue everything at its default now and click Save. On the off chance that you click this View Month its going to bring you to your real logbook. You can see there’s tabs on top for month, week, day and year.
On the off chance that you click Next you can see that we have an Event 1 and an Event 2, on the off chance that we click on it simply brings us to the real Node Page itself. So virtually what you anticipate from a View, however there are some different things we can do to this. One thing you’ll perceive is the way that it makes is based off of your field name and it not so much the cleanest looking way so we’re feeling free to change that.
We’re simply going to make it since we’re just having one datebook on this site we’re sheltered to do this. In case you’re going to show numerous logbook you have to obviously evaluate what you needed every way to be. So we’re going to do this for all the page shows so we’ll say timetable/whatever the … whether its month, week, day or year. So that is the first thing that we’re going to do. The following thing is whether you come into a portion of the settings here you have particular timetable settings.
Here are a couple of diverse choices you can choose in the event that you need to show it as a smaller than normal timetable in the event that you need to utilize full week names, curtailed names, in the event that you need to show week numbers, what number of things to show. In the event that there are multi-day occasion so an occasion that stands crosswise over multi-days … numerous days so we should say you need from a Monday to a Friday you could select to shroud particular columns for multi-day occasions.
We’re going to leave everything at its default on the grounds that that is basically what we requirement for this case however you can transform it in the event that you have to. In the event that you click on the Settings Link beside Calendar Entit