# Base template lookup order for sections

**URL:** <https://discourse.gohugo.io/t/base-template-lookup-order-for-sections/5368>\
**Category:** support\
**Created:** [February 7, 2017, 1:15pm UTC](https://discourse.gohugo.io/t/base-template-lookup-order-for-sections/5368 "2017-02-07T13:15:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitriid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dmitriid/32/2615_2.png) [@dmitriid](https://discourse.gohugo.io/u/dmitriid)\
**Post date:** [February 7, 2017, 1:15pm UTC](https://discourse.gohugo.io/t/base-template-lookup-order-for-sections/5368/1 "2017-02-07T13:15:45Z")

</div>

Based on the discussion in this issue #2995

This is the repo where you can see this behaviour: [https://github.com/dmitriid/dmitriid.com](https://github.com/dmitriid/dmitriid.com)

The full description is in the issue, here’s a condensed version:

I use a custom theme, where the theme’s layout is described in `/themes/freja/_default/{baseof,single,list}.html`

For a specific section of the site (called `gen`) I want to fully override the layout of the site. For this I have `/themes/freja/section/{gen,gen-baseof}.html`

Observed behaviour:

The generated file for a single entry (accessible in browser from [http://localhost:1313/gen/social/](http://localhost:1313/gen/social/)) still has the outer shell from `_default/baseof.html` and `_default/single.html`

The generated file for “section list” (accessible in browser from `localhost:1313/gen/`) gets its outer shell from `_default/baseof.html` and everything else from `section/gen.html`

---

<div class="post-metadata">

**Author:** ![dmitriid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dmitriid/32/2615_2.png) [@dmitriid](https://discourse.gohugo.io/u/dmitriid)\
**Post date:** [February 7, 2017, 1:16pm UTC](https://discourse.gohugo.io/t/base-template-lookup-order-for-sections/5368/2 "2017-02-07T13:16:20Z")

</div>

And here’s the link to the issue: [https://github.com/spf13/hugo/issues/2995](https://github.com/spf13/hugo/issues/2995)

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 7, 2017, 3:15pm UTC](https://discourse.gohugo.io/t/base-template-lookup-order-for-sections/5368/3 "2017-02-07T15:15:58Z")

</div>

What is your question?

---

<div class="post-metadata">

**Author:** ![dmitriid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dmitriid/32/2615_2.png) [@dmitriid](https://discourse.gohugo.io/u/dmitriid)\
**Post date:** [February 7, 2017, 3:23pm UTC](https://discourse.gohugo.io/t/base-template-lookup-order-for-sections/5368/4 "2017-02-07T15:23:29Z")

</div>

The same as in the issue: the layout for the section used to override the default layout, now it doesn’t. How do I make sure section layout overrides default layout?

Also, as per your request in the issue: “Take this further on the discussion forum (start a new thread, and please post a reference to a full source repo that demonstrates your issue).”
