Help with Venti Events Plugin I'm using the Venti events plugin to add recurring events to my site. However, I just want to show the most upcoming event and not all of them. This is a listing page which lists all of my events. This is what I currently have which lists all events.

{% set events = 
  craft.venti.allEvents()
  .startDate('and', '&gt;= ' ~ now)
  .limit(70)
  .relatedTo(categories)
  .order('startDate asc')
  .find() %}

{% for event in events %}
...
{% endfor %}


I found this in their documentation that supposed to show the next event, but this was on a detail page, not a listing page, so not sure exactly how to do this.

{% set next = craft.venti.nextEvent(event.id) %}
Sounds like a feature request for the developers of Venti, but this code should help you achieve what you need.

{% set upcomingEvents = [] %}
{% set upcomingEventIds = [] %}

{% for event in events %}
    {% if not event.eid in upcomingEventIds %}
        {% set upcomingEvents = upcomingEvents|merge([event]) %}
        {% set upcomingEventIds = upcomingEventIds|merge([event.eid]) %}
    {% endif %}
{% endfor %}