{% assign future_events = events | concat: events | map: "future_instances" | flatten %}
{% assign current_events = events | concat: events %}
{% assign all_events = future_events | concat: current_events %}
{% assign sorted_events = all_events | sort: "starts_at" %}
{% for event in sorted_events %}
<div class="other-events-container u-bg-gray-light u-m-t-md u-m-b-md u-p-md row no-gutters">
<div class="other-events-date u-text-center u-p-r-sm">
<h4 class="nyp-type-h4 u-m-b-xs">{{ event.starts_at | date:"%A, %B %d" }}</h4>
<h5 class="nyp-type-h5 u-m-b-sm">
{{ event.starts_at | date:settings.time_format }}
{% if event.ends_at %}
- {{ event.ends_at | date:settings.time_format }}
{% endif %}
</h5>
</div>
<div class="other-events-description">
<p class="u-m-b-sm nyp-type-2023-body-xs-r">
<strong>{{ event.name }}</strong>
</p>
<div class="lw_event_item_location u-m-b-0">
<p class="u-m-b-sm nyp-type-2023-body-xs-r">
<span style="color: #e2231a;" class="fa fa-map-marker"></span>
<a class="styled-link" href="https://www.google.com/maps/search/?api=1&query={{event.location}} {{event.address}}">
{{ event.address }}
</a>
</p>
<a href="{{ event.url }}" style="width: fit-content" class="c-button c-button--small u-m-r-sm">Event Details</a>
</div>
</div>
</div>
{% endfor %}
I have noticed that
{% assign all_events = future_events | concat: current_events %}
whatever I put first here spits out, e.g. if I put current_events first, they show up or if I put future_events, first, future instances showup. But they don’t combine and show up in one big list!
In this code example, all future instances of the event show up instead of the current one. Code is in Liquid HTML
New contributor
nava007 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.