[FIxed] Nested sections don't seem to render with {{ range .Pages }}


I am trying to get nested sections to work, but I only get the first level is sections when I use :

{{ range .Pages }}

I only get the first level of sections.

This is my folders:

- content
       - _index.md
       - parcours1.md

In `themes/mytheme/layours/formations/list.html I have

{{ range .Pages }}
<div class="m-b-3">
  <h1>{{ .Title }}</h1>
  <a href="{{ .Permalink }}">{{ .Permalink }}</a>
{{ end }}

I am only getting cours1 and cours2 listed

It is a tree, you only go down 1 level.

Look at this example:

Okay I see you do :

{{ range .Sections}}
{{ end }}

Is that new ? When I range section, I get my parcours1 with the correct link

Also, why did you use .Reverse?

Thanks for the quick reply!

The example site should explain it; if not you would have to wait for us to improve on the documentation.

Crap okay thanks for your help, I appreciate it very much

@bep I got it to work, thank you.

I was wondering if it’s possible to do something like this :

list of formations

list of buildmaster

single page with a link towards http://localhost:1313/formations/buildmaster/jenkins/thecourse.md

The problem I am having is that in the jenkins folder I have an _index.md but it’s treating it like a list.

Also I noticed in your exemple you have empty <ul>

Can you do if subsection?