How can I show this entry once, even if it meets the if
condition twice? The goal is to show events that are in the month, by comparing this month with dates within an array. The problem is if both date values are a match, then the title is displayed twice.
Collection Entry:
title: 'My Cool Event'
entry_date:
-
date_entry: 'Wed Jun 12 2019'
-
date_entry: 'Tue Jun 11 2019'
Collection and If Tags:
{{ collection:events }}
{{ entry_date }}
{{ if date_entry|format:M == today|format:M }}
<h5>{{ title }}<br></h5>
{{ /if }}
{{ /entry_date }}
{{ /collection:events }}
At present, this outputs the title twice - as both event dates are within the current month.
Ideas - as the collection tag iterates, check if the current item title matches the previous, silence if true. - something with the increment tag?
Thanks <3