Introducing Low Events
We’ve all been there. When discussing a new site with a client, event listings are regularly part of the brief. Although seemingly simple, I found creating events in ExpressionEngine always is somewhat cumbersome. Existing solutions, whether native or in the third party area, always had some drawbacks for me. The more solutions I tried, the more I was feeling an itch.
When creating events in ExpressionEngine natively, you can either use the Entry and Expiration dates for Start and End dates. However, I prefer to use those purely for publishing purposes: whether an entry is published on the site or not. Or you can use two custom date fields, but that usually means using some PHP in your templates (or just the Query module if you’re lucky) to filter the entries. Both native solutions also suffer from DST, a chronic disease that ExpressionEngine has suffered from since the early days, and is bound to keep you busy doing support at least twice a year.
As for third party solutions, there are two that could help. First of all, there’s EEvent Helper. This add-on helps you out by setting native date fields for you, so actually, it falls back to the native method of doing events. Then there’s Solspace Calendar, a very powerful and flexible add-on. And that’s exactly what’s wrong with it. Multiple calendars with different timezones, complex rules for recurring events, import/export ICS data; this all just seemed overkill to me most of the time.
Rolling my own
So, having tried and tested these ways of doing events, I needed something in the middle. Something more user friendly and flexible than the native method, without getting obtuse. I asked some clients about their opinion, which led me to a list of ideas:
- An entry is an event and an event is an entry. Simple as that.
- Don’t bother with recurring events. See previous point.
- Don’t bother with localization, apart from translations. The date/time entered is the date/time displayed. Always.
- No DST. See previous point.
- The fieldtype to enter start and end dates should be intuitive and user friendly.
- Template tags should be intuitive and make sense.
The result of this list is Low Events.
The Low Events fieldtype is inspired by Google Calendar’s date/time picker. I love the way it suggests times for you, shows duration and is smart enough to know when the date you entered is invalid. In your templates, the fieldtype gives you lots of variables to work with to display the dates just the way you want.
The Low Events template tags all center around the idea that you’re either showing upcoming events (omitting passed ones), or showing events per year, month or day (including passed ones). Other tags like the Archive or Calendar tag, will help you link to specific dates.