# List pages of sub-sub-folders

**URL:** <https://discourse.gohugo.io/t/list-pages-of-sub-sub-folders/9436>\
**Category:** support\
**Created:** [December 1, 2017, 1:09pm UTC](https://discourse.gohugo.io/t/list-pages-of-sub-sub-folders/9436 "2017-12-01T13:09:31Z")\
**Posts on this page:** 1\
**Showing post:** 11

<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:** [December 22, 2017, 11:55am UTC](https://discourse.gohugo.io/t/list-pages-of-sub-sub-folders/9436/11 "2017-12-22T11:55:55Z")

</div>

> [@Ferdi](#):
>
> Now my problem is how to stop it from listing everything and make a page with all the sub-pages without linking to each single article.
> 
> If it was possible to use a different layout for the sub-sub-sections I could simply copy the normal list-template and remove the links, but that doesn’t seem to be possible.

Here is how I am able to modify my sub-sections (nested sections) from within `_default/list.html`:

> ```
> {{- if .Sections -}}
> {{- range .Sections -}}
> {{- range $i, $e := .Data.Pages -}}
> <---Layout for parent section---->
> {{- end -}}
> {{- end -}}
> {{- end -}}
> 
> ```

The above will be the layout for the list page of the parent (top level) section.

And then to control the layout of sub-sections I simply have the following (right after the above):

> ```
> {{- range $i, $e := .Data.Pages -}}
> <---Layout for sub- section---->
> {{- end -}}
> 
> ```

And that’'s all there is to it.

I know that @bep and the Hugo Docs say that it is not possible to have a different layout in a nested section, but with a bit of creative thinking _it is indeed possible_ to do this.

And what I posted above I already use in production. So it works like a charm.

Happy holidays everybody! 😉

---

_[View the full topic](https://discourse.gohugo.io/t/list-pages-of-sub-sub-folders/9436)._
