Contentful logo

Contentful Community

Repeating Occurrences Based on One Record

Scenario: We have an event listing app/website and the events are entered into Contentful as records.

Problem: We have events that repeat on a weekly or monthly basis. Currently we have to enter a record for each repeating occurrence. This bloats Contentful and our asset count.

Ask: Does anyone have any suggestions on how to address this issue, so that we only have to enter in event information once and we can display the multiple repeating occurrences on our app/website?

Thanks

@blake a simple solution would is to have an Occurences short text list field on your event model. Make it a check box so your editor can check if it occurs

  • Monthly
  • Weekly

Or even both.

And im assuming you have a date field already,

So on your front end you can use the date field and the value from that occurence field

Let’s say the event content has weekly. Then use that date field as a starting point and calculate the next dates.

So now you have one model with multiple dates without adding new content.

You can even add an end date as well so you only have occurences until that date.