Skip to content

Instantly share code, notes, and snippets.

@a-am
Created October 28, 2014 21:05
Show Gist options
  • Save a-am/e8e1d3dc0c3e35f0495d to your computer and use it in GitHub Desktop.
Save a-am/e8e1d3dc0c3e35f0495d to your computer and use it in GitHub Desktop.
Filtering entries on events plugin.
{# You can filter this way if not needing to focus on recurring events in a specific order. #}
{% craft.entries.section('events').order().limit() %}
{# Or filter in the loop of craft.Events because you have access to any of the other fields in the entry through the variable entry.#}
{% for event in craft.Events.getAllEvents() %}
if(event.entry.fieldName == 'whatever'){
}
{% endfor %}
@dmatthams
Copy link

Thanks for that Adam, although would love to see twig filtering in the future, would happily pay for it if had that ability :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment