After grouping "GroupByParamDate" I want to reversw order by the same params

I have events groupByParamDate startDate
I want to loop them in the reverse order
No they come out like here:

year 2023

  1. ev Jan 2023
  2. ev Apr 2023
  3. ev Aug 2023

I want them to come out

year 2023

  1. ev Aug 2023
  2. ev Apr 2023
  3. ev JAN 2023

So I have:

{{ range .Data.Pages.GroupByParamDate "startDate" "2006" }}
{{ .Key }}
{{ $ex := .Pages.ByParam "startDate" }}
<ul>
{{ range $ex }}
<li>{{ partial "thumb-exhibitions.html" (dict "ctx" . "type" "") }}</li>
{{ end }}
<ul>
{{ end }}

any idea?

{{ $ex := (.Pages.ByParam "startDate").Reverse }}
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.