Answers.Body: <p>Sounds like a feature request for the developers of Venti, but this code should help you achieve what you need.</p>
  
  <pre><code>{% 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 %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-18T10:32:40.197Z
Answers.LastActivityDate: 2017-09-18T10:32:40.197Z
Answers.UserDisplayName: Ben Croker
Body: <p>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.</p>
  
  <pre><code>{% set events = 
    craft.venti.allEvents()
    .startDate('and', '&gt;= ' ~ now)
    .limit(70)
    .relatedTo(categories)
    .order('startDate asc')
    .find() %}
  
  {% for event in events %}
  ...
  {% endfor %}
  </code></pre>
  
  <p>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.</p>
  
  <pre><code>{% set next = craft.venti.nextEvent(event.id) %}
  </code></pre>
  
Tags: <plugin-ventievents>
Title: Help with Venti Events Plugin
ThreadText: # Help with Venti Events Plugin
  
  (Asked by: username_0 on 2016-04-08)
  
  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', '>= ' ~ 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) %}
  
  ```
  
  **Tags:** plugin-ventievents
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-09-18. Score: 1
  
  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 %}
  
  ```
  
  
  ---
  
  