Empty Taxonomy term list when using _index.md for the term

So the title may be confusing, but I’ll try to explain it the best way that I can.

I’m trying to access front-matter in /content/<PARENT DIRECTORY>/<TAXONOMY>/<TERM>/_index.md and have it still render a list for all items with that and preferably without the content files not in that sub directory - strictly use it for front-matter.

In my config I have…

    "partners/tag" = "partners/tags"
    "partners/category" = "partners/categories"

My content structure

  |__ partners
     |__ _index.md
     |__ partner1.md
     |__ partner2.md
     |__ partner3.md

Let’s say partner1.md & partner2.md have Front-matter:

partners/categories: [

The layout structure

   |__ partners
       |__ list.html
       |__ li.html
       |__ single.html

List renders li using…

{{ range $index, $page := (.Paginate (where .Data.Pages "Type" "partners") 20).Pages }}
     {{ .Render "li" }}
{{ end }}

Everything up to this point renders and works as it should, specifically, the listing of the category terms.

But now I need the taxonomy categories to have it’s own layout - I’m choosing not to use the _default directory since I need multiple taxonomy layouts.

So I created…

  |__ partners
     |__ category.html

Everything still works. I see partner1.md & partner2.md on /partners/categories/cat1/ with the layout that I want. But now I need to declare some front matter to the list for some styling changes.

So I added…

  |__ partners
     |__ categories
         |__ cat1
             |__ _index.md

This is where things break. Once I add _index.md I no longer see partner1.md or partner2.md in the list rendering – it’s blank… But I’m able to access the front matter I want. So then I moved partner1 & 2 to the cat1 directory which renders them in the list, but then it is no longer visible in /partners/ listing page. :confused:

Is there some catch-all I can use on range $index, $page := (.Paginate (where .Data.Pages "Type" "partners") 20).Pages to render all the content files even those within a sub directory?

Or maybe I’m approaching this wrong?

I still haven’t solved this… Anyone got any suggestions?

This is the first time I am seeing slashes as part of taxonomies. So those slashes could be the problem. AFAIK, taxonomies sub-directories has to be at the baseURL level. But I could very well be wrong.

Few things you can do:

1.First get stuff working without slashes in the taxonomies
2. If it doesn’t work, share the site source so that you can get better help.

I got it working. I ended up utilizing blocks more and scratch variables for .Sections, which does it what I want it to do. But yeah, whether that’s intentional or not, you can can use slashes as part of taxonomies.

I’ll share my code once the project is done and I can make a vanilla version of it.