# Order Pages ByTitle with Paginator

**URL:** <https://discourse.gohugo.io/t/order-pages-bytitle-with-paginator/21009>\
**Category:** support\
**Tags:** pagination\
**Created:** [September 27, 2019, 8:38pm UTC](https://discourse.gohugo.io/t/order-pages-bytitle-with-paginator/21009 "2019-09-27T20:38:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![magis](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@magis](https://discourse.gohugo.io/u/magis)\
**Post date:** [September 27, 2019, 8:38pm UTC](https://discourse.gohugo.io/t/order-pages-bytitle-with-paginator/21009/1 "2019-09-27T20:38:57Z")

</div>

Hello,

My content structure is as followed:  
– united-states  
– illinois  
– chicago  
\_index.md  
office1.md  
office2.md

In \united-states\illinois\chicago\_index.md and each offficex.md I defined this layout  
type: office  
layout: office

I want to list all offices sorted by title, which I do in layouts\office\list.html. This works fine, until I want to add pagination.

{{ range .Pages.ByTitle }} - sorts offices by title

{{ range .Paginator.Pages.ByTitle }} - sorts offices by date

I’m using latest Hugo version, but let me know if more details are needed. Any help how to fix this will be appreciated.

---

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [September 28, 2019, 9:10am UTC](https://discourse.gohugo.io/t/order-pages-bytitle-with-paginator/21009/2 "2019-09-28T09:10:18Z")

</div>

i **think** you have to build a paginator with the wanted sortings

> **[Pagination](https://gohugo.io/templates/pagination)**
>
> Hugo supports pagination for your homepage, section pages, and taxonomies.

not tryed

```
{{ $paginator := .Paginate .Pages.ByTitle }}
{{ template "_internal/pagination.html" . }}
{{ range $paginator.Pages }}
   {{ .Title }}
{{ end }}
```

---

<div class="post-metadata">

**Author:** ![magis](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@magis](https://discourse.gohugo.io/u/magis)\
**Post date:** [September 28, 2019, 12:46pm UTC](https://discourse.gohugo.io/t/order-pages-bytitle-with-paginator/21009/3 "2019-09-28T12:46:57Z")

</div>

This worked. Thank you!
