# Taxonomy using list.html instead of terms.html

**URL:** <https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558>\
**Category:** support\
**Created:** [October 31, 2019, 5:40pm UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558 "2019-10-31T17:40:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vdadfar](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@vdadfar](https://discourse.gohugo.io/u/vdadfar)\
**Post date:** [October 31, 2019, 5:40pm UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/1 "2019-10-31T17:40:23Z")

</div>

Hello, I’m having an issue where the hugo interpreter occasionally displays this list.html template instead of terms.html for a given taxonomy. My file structure is as follows:

/content-1  
|–\_index.md  
|–subcontent-1.md  
|–subcontent-2.md  
/content-2  
|–\_index.md  
|–subcontent-1.md  
|–subcontent-2.md

When the error occurs, the subcontent files are rendered according to the list.html template, rather than the content files being rendered according to the terms.html file. I have already defined the taxonomy in config.toml. As I said, the issue is inconsistent and seems to flip-flop when I edit the content files or terms/list templates again.

Is there a way I can guarantee that the taxonomy will be rendered according to terms.html?

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [November 1, 2019, 4:33am UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/2 "2019-11-01T04:33:05Z")

</div>

Hi there,

It’s difficult to say what’s going on without seeing your actual code. Do you have your code somewhere we can have a look at to try and replicate?

---

<div class="post-metadata">

**Author:** ![vdadfar](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@vdadfar](https://discourse.gohugo.io/u/vdadfar)\
**Post date:** [November 1, 2019, 5:14am UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/3 "2019-11-01T05:14:23Z")

</div>

Sure, here’s my code for module/terms.html:

```
<div class="mw7 center mt4">
  <div class="flex-ns flex-column mhn1-ns mb3">
      {{ range sort .Pages "Params.order" "asc" }}
          <div class="ph1-ns flex justify-stretch slide">
            {{ .Render "li"}}
          </div>
      {{ end }}
  </div>
</div>

```

and module/list.html:

```
<div class="mw7 center mt4">
  <div class="f2 grey-3 mb2">{{ .Params.unitsTitle }}</div>
  <div class="flex-ns mhn1-ns flex-wrap mb3">
      {{ range sort .Pages "Params.order" "asc" }}
          <div class="ph1-ns w-33-ns flex raise">
            {{ .Render "unit-li"}}
          </div>
      {{ end }}
  </div>
</div>

```

Within the content/ folder, I have the following structure:

![03%20AM](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/6/6c94784720f3b9fe751802ebd6f573d63fdb7d44.png)

And the config file:

```
[taxonomies]
module = "modules"

```

Each subcontent file (e.g. 01-your-name.md) has the appropriate “modules” parameter referring to it’s parent folder.

The goal is to display the \_index.md files in the terms.html template when visiting /modules. However, some publishes result in the subcontent files (e.g. 01-your-name.md) being rendered here according to list.html. The appropriate use of list.html is to list the subcontent files with the metadata of the module index file (which always works properly).

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [November 1, 2019, 5:38am UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/4 "2019-11-01T05:38:38Z")

</div>

> [@vdadfar](#):
>
> And the config file:
> 
> ```auto
> [taxonomies]
> module = "modules"
> 
> ```
> 
> Each subcontent file (e.g. 01-your-name.md) has the appropriate “modules” parameter referring to it’s parent folder.

So you have taxonomy definitions in the frontmatter of your terms?

Is `/modules/` supposed to be content (as in regular pages) or taxonomy folder?

---

<div class="post-metadata">

**Author:** ![vdadfar](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@vdadfar](https://discourse.gohugo.io/u/vdadfar)\
**Post date:** [November 1, 2019, 5:42am UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/5 "2019-11-01T05:42:19Z")

</div>

/modules/ itself is a content folder, yes. And yes each subcontent file, or unit, has it’s own taxonomy definition in the frontmatter.

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [November 1, 2019, 5:52am UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/6 "2019-11-01T05:52:32Z")

</div>

I’m not sure that’s how taxonomies are intended to be used.

From: [Taxonomies | Hugo](https://gohugo.io/content-management/taxonomies/)

> Taxonomies are classifications of logical relationships between content.

It looks like you are trying to have taxonomies defined inside its own terms?

---

<div class="post-metadata">

**Author:** ![vdadfar](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@vdadfar](https://discourse.gohugo.io/u/vdadfar)\
**Post date:** [November 1, 2019, 6:04am UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/7 "2019-11-01T06:04:01Z")

</div>

Yeah that’s a good way of describing what I’m going for - is there an approach more suited to the structure I’m trying to achieve?

---

<div class="post-metadata">

**Author:** ![pointyfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pointyfar/32/5797_2.png) [@pointyfar](https://discourse.gohugo.io/u/pointyfar)\
**Post date:** [November 1, 2019, 6:14am UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/8 "2019-11-01T06:14:18Z")

</div>

What are you trying to do?

If the relationships across pages are just hierarchical, you could get away with a “regular” content structure. The parent-child relationships can be inferred from the structure, and expressed using built-in page variables: [https://gohugo.io/variables/page/](https://gohugo.io/variables/page/)

---

<div class="post-metadata">

**Author:** ![vdadfar](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@vdadfar](https://discourse.gohugo.io/u/vdadfar)\
**Post date:** [November 1, 2019, 5:09pm UTC](https://discourse.gohugo.io/t/taxonomy-using-list-html-instead-of-terms-html/21558/9 "2019-11-01T17:09:01Z")

</div>

I understand. I switched from using taxonomies to simply sections and I’m able to achieve the hierarchical structure I’m going for. Thank you for your guidance!
