# Help creating a list of pages, by section, on homepage

**URL:** <https://discourse.gohugo.io/t/help-creating-a-list-of-pages-by-section-on-homepage/23997>\
**Category:** support\
**Created:** [March 14, 2020, 1:45am UTC](https://discourse.gohugo.io/t/help-creating-a-list-of-pages-by-section-on-homepage/23997 "2020-03-14T01:45:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibusum080](https://avatars.discourse-cdn.com/v4/letter/i/8491ac/32.png) [@ibusum080](https://discourse.gohugo.io/u/ibusum080)\
**Post date:** [March 14, 2020, 1:45am UTC](https://discourse.gohugo.io/t/help-creating-a-list-of-pages-by-section-on-homepage/23997/1 "2020-03-14T01:45:56Z")

</div>

Hello,

I am a first time user of Hugo. I decided to delve in by starting with a template, using the Netlify one-click-hugo-cms as my basis. My troubles began when I tried to add a list of pages to my homepage. What I’m trying to achieve is a list of the most recent pages in a section called reviews.

I created a partial called home-reviews and tried every combination of code I could find online to make the list. Hugo builds the site with no errors, but the content I’m hoping for is missing. Please check out my work in the staging brand of my github repo: [https://github.com/a8FGb109/one-click-hugo-cms/](https://github.com/a8FGb109/one-click-hugo-cms/)

```
indent preformatted text by 4 spaces
<div class="mw7 center">
    <ul class="flex-ns flex-wrap mhn1-ns pa3">
        {{ $paginator := .Paginate (where .Site.Pages "Section" "reviews") 4 }}
        {{ range .Paginator.ByPublishDate.Reverse }}
        <div class="w-50-ns ph1-ns flex">
          {{ .Render "li"}}
        </div>
        
        {{ end }}
        
    </ul>
 
  </div>

```

I’ve been stuck on this seemingly simple thing for the last 3 days. Your help will be greatly 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:** [March 14, 2020, 7:23am UTC](https://discourse.gohugo.io/t/help-creating-a-list-of-pages-by-section-on-homepage/23997/2 "2020-03-14T07:23:41Z")

</div>

You can NOT use the paginator for lists.

```
{{ range $index, $element := first 10 (where site.RegularPages "Section" "eq" "reviews") }}
	<div >
		{{.Render "summary"}}
	</div>
{{ end }}
```

---

<div class="post-metadata">

**Author:** ![ibusum080](https://avatars.discourse-cdn.com/v4/letter/i/8491ac/32.png) [@ibusum080](https://discourse.gohugo.io/u/ibusum080)\
**Post date:** [March 14, 2020, 7:57pm UTC](https://discourse.gohugo.io/t/help-creating-a-list-of-pages-by-section-on-homepage/23997/3 "2020-03-14T19:57:38Z")

</div>

Thank you so much for you help! This worked great. I was missing the summary layout, so I created that and it worked.

---

<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:** [March 16, 2020, 7:57pm UTC](https://discourse.gohugo.io/t/help-creating-a-list-of-pages-by-section-on-homepage/23997/4 "2020-03-16T19:57:40Z")

</div>

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