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.

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.

  • 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 Apr 15 '17 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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