Trying to pull in a limit of 2 events that are upcoming (so the event's eventDate should be newer than today). I currently have this:
{% set entries = craft.entries.section('events').order('eventDate asc') %}
{% set today = now|date('Y-m-d') %}
{% for event in entries %}
{% if today <= event.eventDate %}
<!-- markup here -->
{% endif %}
{% endfor %}
However, this returns all events that are upcoming. I would like to only limit it to 2. The problem when I put the .limit(2) on my for loop is that it chooses the first two (and those happen to be older events). Do I need to do another loop within the if statement and add .limit(2) to that or is there a better way?
Thanks!