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

Support archive

If statements for events

Exire 1 Jan 2013 13:57 question, complete

Hi,

I have a table which I use to output some events. The code is as following:

<table class="table-condensed table-hover">
<tbody>
{exp:low_events:entries channel="calendar" date="{segment_2}" unit="month"}
<tr class="info">
{if '{event_date:first unit="day"}' == 'y'}
<td colspan="2" width="460px"><b>{event_date:start_date format="%d. %F - %l"}</b></td>
{/if}
</tr>
<tr>
<td width="60px"><b>{event_date:start_time format="%H:%i"}</b></td>
<td width="400px">{event_description}</td>
</tr>
{/exp:low_events:entries}
</tbody>
</table>


This current code groups all events by date, so all events on the same day is grouped together and displayed under one day-heading. Problem is that events on other days are being displayed right beneath (there is no line breaks between them). I want events that belong to different days to be separated by a line break or a paragraph. Is there an if statement that I can achieve this with?

Currently, it looks like this:

Example:

January 1st
Event 1
Event 2
January 2nd
Event 1
Event 2

etc. while I want it to look like this:

Example:

January 1st
Event 1
Event 2

January 2nd
Event 1
Event 2

etc.

Regards
Kristoffer

Replies

  1. Low 1 Jan 2013 21:17

    Looks more like a styling issue. Can't you add some extra padding to the header cell (the one with colspan="2")?