{{ $shouldRender := or .Sections .RegularPages }} {{ $hasSections := .Sections }} {{ if $shouldRender }}
{{ with .Sections }}

Subsections

{{ range . }} {{ .Render "section-card" }} {{ end }}
{{ end }} {{ with .RegularPages }}

Pages in this section

{{ range . }} {{ .Render "section-card" }} {{ end }}
{{ end }}
{{ end }}