# Section sub page not working

**URL:** <https://discourse.gohugo.io/t/section-sub-page-not-working/16006>\
**Category:** Uncategorized\
**Created:** [December 26, 2018, 9:44pm UTC](https://discourse.gohugo.io/t/section-sub-page-not-working/16006 "2018-12-26T21:44:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![betz](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@betz](https://discourse.gohugo.io/u/betz)\
**Post date:** [December 26, 2018, 9:44pm UTC](https://discourse.gohugo.io/t/section-sub-page-not-working/16006/1 "2018-12-26T21:44:18Z")

</div>

Can anyone check out our git repo and tell why subpages of a section are not working?

> **[hsbxl / site](https://gitlab.com/hsbxl/site)**
>
> HSBXL.be site - Build on top of Hugo

There is content/projects/citygate which contains a index.md file.  
Which translates to [https://hsbxl.be/projects/citygate](https://hsbxl.be/projects/citygate)  
So far, so good.  
Now i want have subpages of that ‘project’.  
So we can have something like  
[https://hsbxl.be/projects/citygate/kitchen](https://hsbxl.be/projects/citygate/kitchen)

Tried:

- kitchen.md
- kitchen/index.md
- kitchen/\_index.md

nothing seems to generate some page.  
I think I am missing something.

Any pointer would be appreciated.

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [December 26, 2018, 9:51pm UTC](https://discourse.gohugo.io/t/section-sub-page-not-working/16006/2 "2018-12-26T21:51:42Z")

</div>

Change `content/projects/citygate/index.md` to `_index.md`. This changes it from a leaf to a branch bundle, and allows nesting of more bundles.

---

<div class="post-metadata">

**Author:** ![betz](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@betz](https://discourse.gohugo.io/u/betz)\
**Post date:** [December 27, 2018, 12:17am UTC](https://discourse.gohugo.io/t/section-sub-page-not-working/16006/3 "2018-12-27T00:17:42Z")

</div>

great, but then it becomes a list and shows the content of list.html  
i would need it to still be a single.html

Or maybe i can have the list detect it is on which level of that section it is and show different content/menu?

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [December 27, 2018, 1:49am UTC](https://discourse.gohugo.io/t/section-sub-page-not-working/16006/4 "2018-12-27T01:49:29Z")

</div>

> [@betz](#):
>
> great, but then it becomes a list and shows the content of list.html

That’s what a section is. But you control what is shown. So in your `list.html`, or `citygate/list.html`, just show the `.Content` and don’t list anything. It being a list page means it has a default context, but it will still show all the front matter and content you add. 🙂

---

<div class="post-metadata">

**Author:** ![betz](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@betz](https://discourse.gohugo.io/u/betz)\
**Post date:** [December 27, 2018, 11:46pm UTC](https://discourse.gohugo.io/t/section-sub-page-not-working/16006/5 "2018-12-27T23:46:16Z")

</div>

allright. I did a small refactor.  
list pages are now also \_index.md pages.  
And logic from within my list.html is migrated to shortcodes.

thanks all for your help
