Jump to content

Mixing one-time events and recurring events in one Event list


SwimToWin
 Share

Recommended Posts

Hi, I am in the process of creating a local news site, based on ProcessWire.

Among other things, the site will be presenting local events, and I have a question specifically about recurring events.

Events (recurring or not) shall be shown in *one* list, like in this example:

  • 10.01.2019 19:30 - Some event (Page #1235)
  • 11.01.2019 17:15 - Another event (Page #1237)
  • 12.01.2019 16:00 - The Final Event (Page #1239)

When I have recurring events, I would like to keep these on the same page (using a Repeater field) as shown here:

  • 10.01.2019 19:00 - A Star is Born film, showing in Cinema ABC (Page #1234 holds all occurrences)
  • 10.01.2019 19:30 - Some event (Page #1235)
  • 11.01.2019 19:30 - A Star is Born film, showing in Cinema ABC (Page #1234 holds all occurrences)
  • 11.01.2019 17:15 - Another event (Page #1237)
  • 12.01.2019 20:00 - A Star is Born film, showing in Cinema ABC (Page #1234 holds all occurrences)
  • 12.01.2019 16:00 - The Final Event (Page #1239)

The editing interface will use these fields:

  • id
  • title
  • date_start - a datetime field (use for one-time events)
  • time_start - a text field
  • dates - Repeat field with these sub-fields:
    • date_start - a datetime field (use for recurring events)
    • time_start - a text field

Listing events by date_start is simple when the site only has run-once events (using the 'date_start' field). But when repeated events enter the picture, it is necesssary to generate all occurrences for each repeated event ('dates.date_start') - and join these with the list of run-once events ('date_start'). I am unsure if that is possible?

PS: I am aware that Ryan created an Events fieldtype module, unfortunately the site needs more detail about each event than this module offers so it is easier to create a site-specific set of Event fields.

Link to comment
Share on other sites

Maybe it's easier to let Google do the heavy lifting and just display the results on your website...

Quote

There's no eye candy here, but the benefits of pulling from Google's services (like Calendar) aren't so much in the output of examples like this, but instead in the fact that their website is connected to a bigger ecosystem. An ecosystem the client can manage in various places and with various people, various devices and so on. A service like Calendar can also be subscribed to by other users and is generally a lot more broadly "connected" than an individual website would be. Being able to make the website part of that bigger network of activity is a real benefit to clients. And the fact that it's essentially free, while more capable and powerful than almost any paid option is definitely a mountain of icing on the cake.

https://processwire.com/blog/posts/composer-google-calendars-and-processwire

Link to comment
Share on other sites

I have had similar event-situations in the past and went different ways.

Solution 1:

I added a date_end (to keep your naming) field to my events and displayed an additional "from/ab (german: from)" to the event itself when listed somewhere - so no repeaters needed (in my case). It's almost like a date range for a single event. Works really well and can be found at: https://www.musikschule-neumuenster.de/termine/ 

Solution 2:

I created one main page for that event and used @psy's recurring events module to create follow-up pages/events I can show in my lists.

 

In your case I'd probably go with solution 2.

That way you can although create semantic JSON+LD markup for each day/event if wanted.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...