I've got an events listings which works pretty well and there is a:
- Custom Date field, eventEnd (just date)
- Custom Start Time, eventStart (just time)
- Custom End Time, eventEnd (just time)
I can list these entries so we list by date then time by using:
{% for entry in craft.entries.section('events').order('eventDate', 'eventStart').find() %}
but eventStart is ignored altogether, even when I would use:
{% for entry in craft.entries.section('events').order('eventStart').find() %}
I would expect:
Event 1: 14:00 Event 2: 15:00 Event 3: 16:00
but instead get something more random based I think on post date.
Suggestions welcome thank you!
UPDATE:
my biggest issue is actually being able to list by eventStart at all. Just using {{ eventStart }} reveals the current date. But if I try to boil down to just the hour, it's not a recognised way of ordering (even though it's just a set of numbers?)
So, I'm not sure where to head with this. I'm sure that if my start time was bundled in with the main date, all would be fine, but it makes the system a bit less obvious and flexible.
Here's what I've tried:
{% set completeeventlist = craft.entries.section('events') %}
{% for x in craft.entries(completeeventlist).order('eventDate') %}
<ul>
{% set es = x.eventStart|date('H') %}
{% for entry in craft.entries(x).order(es) %}
<li>{{ entry.id }}{{ es }}</li>
{% endfor %}
</ul>
{% endfor %}
{% for entry in craft.entries.section('events').order('eventDate, eventStart').find() %}