Seperate taxonomy list and single pages

Hi there,

I’m trying to use list.html and single.html in my theme for tags. The idea being /tags should show a list of the sites tags, where as /tags/tech would show a list of articles with the tech tag.

Currently /tags/tech shows the list of articles nicely, but is using the list template. Because this is a single tag, shouldn’t it be using the single.html template?

My theme folder structure is as so:

theme/
├── [...]
└── layouts/
    ├── [...]
    ├── tags/
    │   ├── list.html <-- the template used for /tags and /tags/tech
    │   └── single.html <-- what I want /tags/tech to use
    └── taxonomy/
        └── list.html <-- works great

TLDR; How do I configure my templates so /tags and /tags/tech use seperate templates?

No. Term pages (/taxonomy-foo/term-foo) are sections.

You need a different layout structure. See docs.

I find these structures to be intuitive:

layouts
└── tags/
    ├── taxonomy.html
    └── term.html

or

layouts
└── _default/
    ├── baseof.html
    ├── home.html
    ├── list.html
    ├── single.html
    ├── taxonomy.html
    └── term.html

Just to confirm, does this mean we can have multiple variations of list pages? ie. instead of just list.html, we can have taxonomy.html which will display a different layout for the /tags/ path? Hope i’m interpretting this correctly TIA

Yes, you are interpreting it correctly.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.