and this works - in col-3 i get _index.md and in col-8>.row>.col-4 rest of files.
BUT i wish to render _index.md from this section and then rest from section template in _default/why.html
How can i do that (and is there something to render just _index.md the clean way)?
I don’t want to and don’t need to create archetype for this section as this is something only on homepage. I wanted to do it proper way with option to add more content easily using section template, but i don’t understand this part as hugo don’t see layout for this section - archetypes will make this to happen?
I’ve moved your post to its own topic as the one you were replying to was several years old and there have been a lot of changes to Hugo since then.
As for your question, if I understood it correctly, you want to render the contents of a section page (content/why/_index.md) and then render the contents of its child pages separately. Try something like this:
{{ $why := .Site.GetPage "/why" }} <!-- get section page content/why/_index.md -->
{{ $why.Content }}
<br>
{{ range $why.Pages }} <!-- get children pages: content/why/block.md -->
{{.Content}}
<br>
{{ end }}
Thank you, this is much more elegant solution. So in cases like this there’s no need for custom list layout and it’s ok (or is it good hugo practice in this case)?