I’ll admit it: I am a Drupal newbie. We chose it for our CMS last year, but we haven’t really been using it as a CMS as much as a place to dump and view our internal key indicator reports. But finally! Ah, yes… we finally have a feature request that is actual content management - an event calendar.
Imagine my surprise when I go looking for an event calendar module and find nothing. How could such a huge CMS not have a simple event calendar? A big part of this misunderstanding was that I didn’t understand Drupal - at all. I still don’t really, but figuring this feature out has helped a lot.
One thing to realize is that Drupal is a content management system. So (eventually) it would make sense to create event content and display that content in a specific way. I surprisingly couldn’t find much documentation on this, so below are the steps I took to get my event calendar up and running. They’re kind of abbreviated, so just ask if you need any clarification. Keep in mind this was a learning experience, so if you have any tips for me, I would like those as well. ;)
- ## Install Modules
- View
- Date
- CCK
- Calendar
- Don’t forget to give yourself permissions to administer these modules and enable them!
- ## Create Calendar Event Content Type
- Name: Event
- Type: event
- Title Field Label: Event
- Body Field Label: Details
- Do not promote to front page.
- Save
- Go to Manage Fields for Event in the content type list
- Add a field called Date of type fieldeventdate with a textfield/popup calendar+repeat selector. Configure it to be required and blank by default, have a reasonable format, and to hide the repeat options by default.
- Add a field called Location of type field_event_location that is a single-row text field. Configure it to be 100 chars long and required.
- ## Set up A Calendar View
- Go to Administer > Views
- Enable the default calendar view and clone it.
- View Name: a_calendar
- View Description: Calendar
- Change the title to “Whatever you want Calendar”
- Change Arguments > Date: Date (Node: Updated date) to Content: Date (field_event_date value) Scroll down a bit to see the checkboxes (under Date fields)
- Add a sort criterion for Content: Date (field_event_date value)
- Add a filter for Node: Type is one of Event
- Click the Calendar page side-tab and change the path to “a_calendar”
- Click the Calendar block side-tab and change the block settings admin to “A Calendar”
- Save the view.
- Navigate to ?q=a_calendar to make sure it is working.
- ## Set up Roles
- Add a new role called Calendar_User and add the following permissions:
- Edit/view field_event_*
- (Create | delete own | edit own) event content
- Give this role to whoever you want to create event entries. (Let’s call them eventries for fun)
- Add a new role called Calendar_User and add the following permissions:
- ## Add a link somewhere and enjoy!
4 Ace Technologies
No comments:
Post a Comment