{{- $version := .version -}}
{{- $pageUrl := .pageUrl -}}
{{- $scratch := newScratch -}}
{{ range .section }}
{{ if eq (index (split .File.Path "/") 1 ) $version }}
{{ $scratch.Add "sectionsForVersion" (slice .)}}
{{ end }}
{{ end }}
{{ if ne ($scratch.Get "sectionsForVersion") nil }}
{{ if gt (len ($scratch.Get "sectionsForVersion")) 0 }}
{{ .sectionTitle }}
{{ range ($scratch.Get "sectionsForVersion") }}
{{ partial "docs/navbar-link.html" (dict "ctx" . "pageUrl" $pageUrl "version" $version) }}
{{ end }}
{{ end }}
{{ end }}