2

I'm using the calendar demo templates that came with Solspace Calendar (documentation here). I've got a couple repeating events and I want to output the occurrence index (Day 1, Day 2, Day 3, etc.).

Here's the code for the specific day:

{% for entry in day.events %}
  <a href="{{ entry.title }}">{{ entry.title }}</a>
{% endfor %}

From the docs, I'd think occurrenceCount to work, but it returns 0 for each event vs the index of the occurrence.

0

1 Answer 1

1

If you're referring to the position of the event inside the loop, so you can just use this:

{{ loop.index }}

If you're referring to which occurrence the event is (of the full series of recurrences of that event), then I don't think that is currently possible.

2
  • Yes, the latter. This would be on the calendar view. So think of a series of 3 days (repeating event). There a way I can request this formally?
    – Ryan Shrum
    Commented Apr 15, 2017 at 12:50
  • I'm also looking for this functionality - has there been any updates to this?
    – strandall
    Commented Jun 13, 2022 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.