Low events is not displaying any past events?
Hi, displaying future events seems to be fine, but I cannot display any of the past events...
this is the code I use:
{exp:low_events:entries dynamic="no" channel="ch_auftritte" events_field="cf_auftritte_low_events" show_active="no" show_passed="yes" show_expired="yes" show_future_entries="no" show_upcoming="no" limit="100" sort="desc" disable="member_data|pagination"}
<div class="grid_2 left format_small">
<p class="date">{cf_auftritte_low_events:start_date format="%d.%m.%y"} {if cf_auftritte_low_events:one_day != "y"} – {cf_auftritte_low_events:end_date format="%d.%m.%y"}{/if}</p>
<h2>{if cf_auftritte_titel}{cf_auftritte_titel}{if:else}{title}{/if}</h2>
{if cf_auftritte_text}<p>{cf_auftritte_text}</p>{/if}
{if cf_auftritte_link}<p><a href="{cf_auftritte_link}">→ {exp:parse_url parts="host"}{cf_auftritte_link}{/exp:parse_url}</a></p>{/if}
</div>
{/exp:low_events:entries}
when I use show_upcoming="yes" everything is fine.
when I change low_events to channel, everything is correct.
I am on expressionengine 2.5.2 and low_events 1.3.1
although I just upgraded to low_event 1.3.1 from a fairly old version.
any help appreciated!
cheers
stefan
Replies
outline4 20 Nov 2014 15:03
omg...
when using the date_from="2011-01-01" date_to="today" parameters it's working.
well, I, personally would consider this a bug or an inconsistency...
since you don't have to use the date_from and date_to parameter for future events...
when using the show_passed="yes" with show_active="no" and show_upcoming="no", I would suggest that you show all of the events until today... without having to set date_from and date_to...
hm?
cheers
stefan
Low 20 Nov 2014 15:05
tl;dr use unit="passed"
The low_events:entries tag is for displaying entries in a certain range. The range is determined by the date and unit parameters. Date defaults to today, unit defaults to upcoming. So, if neither is given, upcoming events based on today are shown. More examples:
- date="2014-11-02" unit="month" : all events that are active in November 2014.
- date="2013-01-01" unit="passed" : all events that have passed, based on Jan 1st 2013.
- date="today;+2 weeks" unit="custom" : all events that are active between now and the coming 2 weeks.
You can exclude events from that range, by setting show_passed/show_active/show_upcoming to "no". This will always look at now. So, for example: date="2014-11-02" unit="month" show_passed="no" : all events that are active in November 2014, except the ones that have passed.
You haven't defined the date or unit parameter, so the tag defaults to upcoming. Then it makes sense it doesn't show passed events, because it would only show events that are active today and onward. So only events that have passed today would be displayed. What you're after, to display passed events, is unit="passed".
outline4 20 Nov 2014 17:49
OK thanks!
That makes a whole lot more sense when you explain it like that ;D