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

**URL:** <https://discourse.gohugo.io/t/after-grouping-groupbyparamdate-i-want-to-reversw-order-by-the-same-params/45860>\
**Category:** support\
**Created:** [August 23, 2023, 11:47pm UTC](https://discourse.gohugo.io/t/after-grouping-groupbyparamdate-i-want-to-reversw-order-by-the-same-params/45860 "2023-08-23T23:47:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![solopx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/solopx/32/8218_2.png) [@solopx](https://discourse.gohugo.io/u/solopx)\
**Post date:** [August 23, 2023, 11:47pm UTC](https://discourse.gohugo.io/t/after-grouping-groupbyparamdate-i-want-to-reversw-order-by-the-same-params/45860/1 "2023-08-23T23:47:55Z")

</div>

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:

```auto
{{ 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?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [August 24, 2023, 12:45am UTC](https://discourse.gohugo.io/t/after-grouping-groupbyparamdate-i-want-to-reversw-order-by-the-same-params/45860/2 "2023-08-24T00:45:59Z")

</div>

```auto
{{ $ex := (.Pages.ByParam "startDate").Reverse }}

```

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [August 26, 2023, 12:58am UTC](https://discourse.gohugo.io/t/after-grouping-groupbyparamdate-i-want-to-reversw-order-by-the-same-params/45860/4 "2023-08-26T00:58:02Z")

</div>

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