Open
Description
I wanted to reuse the code
{% include get_all_events.html %}
{% assign sorted_events = all_events | sort: 'startdate' | reverse %}
{% assign training_events = "" | split: "," %}
{% for event in sorted_events %}
{% if event.labels %}
{% if event.labels contains "outreach" %}
{% assign training_events = training_events | push: event %}
{% endif %}
{% endif %}
{% endfor %}
{% expandable training_events 7 %}
{% include print_event.html students=1 event=expandable %}
{% endexpandable %}
on the newly renamed "outreach" page proposed in #2019 but I noticed when testing that if the interger argument for this line {% expandable training_events 7 %}
is greater than the number of elements available (i.e we have only 2 events in the array training_events
but I ask for 7 before the "Show More" box appears) then it renders
some unordered lists tags on the page.
This is not a big deal as eventually the array will contain more events, or I could simply make the number smaller for now. But it would nice for those tags to not render when we have few events to list.
Metadata
Metadata
Assignees
Labels
No labels