Templates for subcategories?

Hello.
I’m trying to build a site with a structure that looks like:
/category/subcategory/post

The problem is, both category and subcategory seem to use the same list template no matter where I place it. I tried both layouts/category/subcategory and layouts/subcategory, furthermore single template is also the one placed in category. How do I make a separate set of templates for the subcategory?

I think the current only practical way is to adjust the type (you could set the layout too, but I suspect that’s not what you want) in a cascade section in subcategory/_index.md.

Seems reasonable, thank you.

How do I refer it there?

You don’t. Type is one of the core page attributes used for layout selection. It defaults to the top level section (e.g. blog), but you can set it in front matter – and setting it in a cascade block means that it gets… cascaded downwards.

I still don’t get it. The tree looks like this:

content
|- _index.md
`- category
   |- _index.md
   `- subcategory
      |- _index.md
      `- content.md
theme
`- mytheme
   `- layouts
      `- category
         |- list.html
         `- single.html

Where should I put the template and how and where should I refer it? Documentation is really sparse and barely makes any sense :frowning:

I might just declare a variable in the front matter and add the conditional to the template, but it doesn’t look like a good solution.