# $.Site.Pages subsection without list view

**URL:** https://discourse.gohugo.io/t/site-pages-subsection-without-list-view/6217
**Category:** support
**Created:** [April 17, 2017, 10:00am UTC](https://discourse.gohugo.io/t/site-pages-subsection-without-list-view/6217 "2017-04-17T10:00:27Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Heydon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/heydon/32/3010_2.png) [@Heydon](https://discourse.gohugo.io/u/Heydon)
#### Post date: [April 17, 2017, 10:00am UTC](https://discourse.gohugo.io/t/site-pages-subsection-without-list-view/6217/1 "2017-04-17T10:00:27Z")

</div>

Hi!

I am iterating over a section in a navigation partial, like so:

`{{ range where $.Site.Pages.ByTitle "Section" "guidelines" }} <li><a href="{{ .Permalink }}">{{ .Title }}</a></li> {{ end }}`

I have two problems:

1. I want to show just the subsection “interaction” (which is in my content under guidelines/interaction)
2. I want to exclude the list view which automatically gets added (i.e. where `.Title` is “guidelines” and it lists all content)

I’m very new to this templating language. Thanks very much for your help!

---

<div class="post-metadata">

### Author: ![samozzy](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/samozzy/32/1861_2.png) [@samozzy](https://discourse.gohugo.io/u/samozzy)
#### Post date: [April 17, 2017, 9:32pm UTC](https://discourse.gohugo.io/t/site-pages-subsection-without-list-view/6217/2 "2017-04-17T21:32:50Z")

</div>

For (1), perhaps add an `if` statement within the `range`?

```auto
{{ if eq .Params.categories "interaction" }}
   ... Do things ...
{{ end }}

```

Though I’m not sure on how to access the subdirectory off-hand.

For (2), you can either:

- Make /layouts/\_default/list.html blank (or whatever else you want it to be)  
Which will affect _all_ list pages.
- Make /layouts/guidelines/list.html blank (or whatever else you want it to be)  
You might need to create this to do so, but it will only affect everything in the guidelines section (that is, `/guidelines/...`)

---

<div class="post-metadata">

### Author: ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)
#### Post date: [April 18, 2017, 1:23am UTC](https://discourse.gohugo.io/t/site-pages-subsection-without-list-view/6217/3 "2017-04-18T01:23:31Z")

</div>

Nested sections are not currently supported but are on the roadmap for the next release. Therefore content/guidelines/interaction/ and content/guidelines/ are both in the “guidelines” section.

That said, you could always filter based on a param that is unique to each of the content files under guidelines…

---

<div class="post-metadata">

### Author: ![Heydon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/heydon/32/3010_2.png) [@Heydon](https://discourse.gohugo.io/u/Heydon)
#### Post date: [April 18, 2017, 7:58am UTC](https://discourse.gohugo.io/t/site-pages-subsection-without-list-view/6217/5 "2017-04-18T07:58:11Z")

</div>

Okay, looks like I’ll have to be explicit for categories, then. Thanks for the tip!

Just tried your suggestions for 2. A blank `list.html` unfortunately does not remove the list item, which then links to a blank page.

?

**Edit** I also tried using {{ .Render “li” }}, using an li.html template under guidelines, but that didn’t help either.

---

<div class="post-metadata">

### Author: ![rdwatters](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rdwatters/32/2848_2.png) [@rdwatters](https://discourse.gohugo.io/u/rdwatters)
#### Post date: [April 18, 2017, 8:42pm UTC](https://discourse.gohugo.io/t/site-pages-subsection-without-list-view/6217/6 "2017-04-18T20:42:10Z")

</div>

> [@Heydon](#):
>
> Okay, looks like I’ll have to be explicit for categories, then. Thanks for the tip!

I obviously have very little knowledge about your site, but have you considered treating “categories” like a Taxonomy instead?

---

<div class="post-metadata">

### Author: ![Heydon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/heydon/32/3010_2.png) [@Heydon](https://discourse.gohugo.io/u/Heydon)
#### Post date: [April 18, 2017, 10:27pm UTC](https://discourse.gohugo.io/t/site-pages-subsection-without-list-view/6217/7 "2017-04-18T22:27:01Z")

</div>

No, but I’ll look into it! I’m not currently very familiar with taxonomies.
