diff --git a/source/_partials/talks-table.twig b/source/_partials/talks-table.twig index 0a649a35..6a83839c 100644 --- a/source/_partials/talks-table.twig +++ b/source/_partials/talks-table.twig @@ -7,7 +7,8 @@ - {% for event in events|sortbyfield('date')|reverse %} + {% set events = reverse_order ? events|sortbyfield('date')|reverse : events|sortbyfield('date') %} + {% for event in events %} {{ event.date|date('j F Y') }} diff --git a/source/talks.html.twig b/source/talks.html.twig index 5950845a..08e778d2 100644 --- a/source/talks.html.twig +++ b/source/talks.html.twig @@ -20,4 +20,4 @@ use: [talks, posts] {% endfor %} {% endfor %} -{% include "talks-table" with { events: events, show_talk: true } %} +{% include "talks-table" with { events: events, show_talk: true, reverse_order: true } %}