All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Splitting events with a date range to display individually by day on listings page

thoughtful_web 6 Mar 2013 09:34 question, complete

Hi Low,

I have a new client who has asked me to replicate the functionality of their existing website.

Their current events calendar displays events by day, starting from the current (or selected date) and displays the next 5 or so active events. The listing also contains a date heading for each event grouping (by day).

I’ve attempted to recreate this functionality with the following code:

{exp:low_events:entries  
channel="event"
unit="upcoming"
disable="categories|member_data"
date="{segment_3}"
}

{if '{cf-event-dates:first unit="day"}' == 'y'} <h1>{cf-event-dates:start_date format="%l %j %F"}</h1>{/if}{/if}

[content]

{/exp:low_events:entries}


This works fine for events with start and end dates the same day, however, any event where the dates are different it only displays one entry (based on the start date).

For example, if Event 1 starts on the 20th and ends in the 22nd if will only list the event on the 20th. Is there any way to make it display a listing for the 21st and 22nd?

I guess I need it to work like a bit the Calendar tag.

Is this possible to achieve with the lastest Low Events add-on?

Thanks,

Simon

Replies

  1. Low 6 Mar 2013 09:57

    Hi Simon,

    The Low Events Entries tag (like the Channel Entries tag) will only display unique/distinct entries. It won't display the same entry more than once in the same list.

    To get the same entry/event multiple times on the page, you'll need to use multiple Entries tags, one for each day.

  2. thoughtful_web 6 Mar 2013 10:42

    Thanks Low,

    I guessed that would be the answer, but worth asking all the same.

    Simon