# Unwanted "pages" show up in my list view

**URL:** <https://discourse.gohugo.io/t/unwanted-pages-show-up-in-my-list-view/6656>\
**Category:** support\
**Created:** [May 20, 2017, 10:19am UTC](https://discourse.gohugo.io/t/unwanted-pages-show-up-in-my-list-view/6656 "2017-05-20T10:19:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![x2thel](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@x2thel](https://discourse.gohugo.io/u/x2thel)\
**Post date:** [May 20, 2017, 10:19am UTC](https://discourse.gohugo.io/t/unwanted-pages-show-up-in-my-list-view/6656/1 "2017-05-20T10:19:07Z")

</div>

Hi,  
a few weeks ago I decided to build my new blog with Hugo. I’ve read through the docs, experimented and learned a lot and then decided to build a theme from scratch so I can learn best about how things are put together.

I’m almost done except for one problem: In my content folder I have one single file ‘[impressum.md](http://impressum.md)’ and one directory ‘post’ that contains all of my blog posts which I cateorize using tags. I want my homepage to list all of my post type files but not my impressum page. But my (pagination enabled) homepage view also lists my ‘impressum’.

I only use \_default/list.html for my tags lists and I grab them with `{{ .Paginator.Pages }}` which I use for the homepage template as well. In my [impressum.md](http://impressum.md) front matter, I define the type as ‘page’. My blogposts have no defined type so I assume them to be of type ‘post’. What is this Pages variable doing and how does it relate to listing "pages’ of certain sections.

I think I’ve read all the relevant docs but tags, categories, taxonomies, sections, types, page, pages, Pages!.. there seem to be a few too many abstract but very much related terms for my poor brain to handle.

Can someone please tell me what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [May 20, 2017, 10:48am UTC](https://discourse.gohugo.io/t/unwanted-pages-show-up-in-my-list-view/6656/2 "2017-05-20T10:48:32Z")

</div>

Personally I use a frontmatter parameter to hide pages from sections of my site.

> `hidden = "true"`

And then

> `{{ range where .Paginator.Pages "Params.hidden" "ne" "true" }}`

But there are several ways of doing this.

---

<div class="post-metadata">

**Author:** ![WoJ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/woj/32/1191_2.png) [@WoJ](https://discourse.gohugo.io/u/WoJ)\
**Post date:** [May 20, 2017, 3:02pm UTC](https://discourse.gohugo.io/t/unwanted-pages-show-up-in-my-list-view/6656/3 "2017-05-20T15:02:42Z")

</div>

@alexandros: this is a nice idea, thanks (I have the same problem as the OP). Is it extendable to `.Next` and `.Prev`?  
In other words, is there a construction which states `{{ .Next if ."Next.Params.hidden" "ne" "true" }}` (sorry, I do not know Go (yet))

---

<div class="post-metadata">

**Author:** ![x2thel](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@x2thel](https://discourse.gohugo.io/u/x2thel)\
**Post date:** [May 20, 2017, 3:32pm UTC](https://discourse.gohugo.io/t/unwanted-pages-show-up-in-my-list-view/6656/4 "2017-05-20T15:32:04Z")

</div>

Thanks a lot, @alexandros, for pointing me in the right direction. I found a snippet in the template function docs that make it even easier in my case:

`{{ ranger where .Paginator.Pages "Section" "post" }}`

This way, only my blog posts appear on my homepage.

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [May 20, 2017, 4:06pm UTC](https://discourse.gohugo.io/t/unwanted-pages-show-up-in-my-list-view/6656/5 "2017-05-20T16:06:35Z")

</div>

Um… who said that I know Go? LOL!

No. I understand just enough to get the job done in Hugo. And that is through trial and error, searching this forum, reading parts of the docs, browsing themes and other people’s projects and of course the kindness of posters in this forum. But I don’t _really_ know it. 👓

Now regarding pagination. I haven’t tested this since I don’t use next/prev pagination, but I think it should work.

> {{ range where .Paginator.Pages “Params.hidden” “ne” “true” }}  
> {{with .PrevInSection }}  
> …  
> {{ end }}  
> {{ with .NextInSection }}  
> …  
> {{ end }}  
> {{ end }}
