Getting a subsection?

I’m sorry I didn’t understand your question.

The variable that holds Nested Sections below a Section is called .Sections.

Here is an example for creating a dynamic list of the various Nested Sections under a Section:

{{ with site.GetPage (printf "/%s" .Section) }} 
{{ $sections := .Sections }}
{{ range where $sections }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
{{end}}

Ref: Creating a menu for all Nested Sections within a Section

I suppose that within the above list you could enter whatever condition you need.

1 Like