.Render does not find my template

I’m building an archive view and my approach is to use a section.

I named the section ‘blogarchive’ for the time being - I’m not sure wether ‘archive’ is somehow a reserved word.

├── content │ ├── about.md │ ├── blogarchive │ │ └── _index.org │ └── post ├── layouts │ ├── _default │ │ └── mysummary.html │ ├── blogarchive │ │ ├── list.html │ │ └── summary.html
In list.html I’m using {{ .Render "summary" }} and I would expect that summary.html out of my section would be used. Instead it loads summary.html from _default. Which is in my case located in the theme’s directory.

Do I miss something here? Is it correct what is written in the documentation? Maybe it’s not true for my case?

I’m using a workaround by placing mysummary.html in _default and referencing that. That works fine but I would like to know if there is any misconception on my side.

This is a little light on context, but I’ll take a guess:

  • Since (currently) .Render only supports regular pages, I assume you call .Render inside the list loop.
  • So the “.” context is the Page; you would then need to look at the Page’s type to decide which template is chosen, and so it ends up in _default.

Thank you very much for your explanation .

Indeed I call .Render out of the list loop

{{ range .Pages}}
  {{ .Render "summary" }}
{{ end }}

I moved summary.html to the according section - post in my case - and it renders nicely.