0

I am using low events for my calendar. I am trying to find conditional that will allow me to show both my event start date and event closing date when my event lasts more than one day and just the start date when the event is only on one day.

So in the code below showing the start and end_date means if the event is only on one day we see that date twice.I need an conditional to apply to the end_date code section which is based on the event being more than one day.

Thanks for any help

            <figcaption class="news-event__caption">
                <time itemprop="startDate" content="{event_date:start_date format='%Y-%m-%d'}" datetime="{event_date:start_date format='%Y-%m-%d'}">
                    <span class="day">{event_date:start_date format="%d"}</span>
                    <span class="month">{event_date:start_date format="%F"} </span>
                     <span class="day"> {event_date:end_date format="%d" }</span>
                     <span class="month">{event_date:end_date format="%F"}</span>
                     </time>    
            </figcaption>

1 Answer 1

1

Try using the :one_day modifier.

{if '{event_date:one_day}' != 'y'} Show stuff for multiple days {/if}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.