From e37b6fcf799536f0c100c358a9198d10cdaed689 Mon Sep 17 00:00:00 2001 From: Eric Bremner <ebremner@uwaterloo.ca> Date: Fri, 27 Oct 2023 12:01:16 -0400 Subject: [PATCH] ISTWCMS-6611: fixing listing page tempate for events --- ...rmatted--uw-view-events--event-page.html.twig | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/templates/views/views-view-unformatted--uw-view-events--event-page.html.twig b/templates/views/views-view-unformatted--uw-view-events--event-page.html.twig index 2c9bdf90..70fbadaa 100644 --- a/templates/views/views-view-unformatted--uw-view-events--event-page.html.twig +++ b/templates/views/views-view-unformatted--uw-view-events--event-page.html.twig @@ -1,4 +1,18 @@ -{% for data in node_data %} +{% set new_node_data = [] %} + +{% for nd in node_data %} + + {% set new_node_data = new_node_data|merge([ + nd|merge({ + '#uw_index': loop.index, + '#uw_row_count': rows|length + }) + ]) %} + +{% endfor %} + +{% for data in new_node_data %} + <div class="views-row"> {% include '@components/card/card--teaser/_card--teaser.twig' with { 'teaser': data, -- GitLab