{{ $.Scratch.Set "topLevel" . }} {{ range $product := $.Site.Sections }} {{ range $version := .Sections }} {{ range $language := .Sections }} {{if $.CurrentSection}} {{ if .IsAncestor $.CurrentSection }} {{ $.Scratch.Set "topLevel" . }} {{end}} {{end}} {{end}} {{end}} {{end}}
{{ if .Title }} {{.Title}} {{ else if .Params.shortTitle }} {{.Params.shortTitle}} {{ else }} (No Title) {{end}}
{{ define "menu" }} {{/* .node and .activeNode come from the caller */}} {{- $activeNode := .activeNode -}} {{- with .node -}} {{- $isActive := "" -}} {{- if eq .UniqueID $activeNode.UniqueID -}} {{- $isActive = "active" -}} {{- end -}} {{- $isOpen := false -}} {{- if (or .Params.alwaysOpen (.IsAncestor $activeNode)) -}} {{- $isOpen = true -}} {{- end -}} {{- if .IsSection -}} {{- $children := (add (len .Pages) (len .Sections)) -}}
  • {{- if .Params.shortTitle -}} {{ .Params.shortTitle}} {{- else -}} {{ .Title }} {{- end -}} {{- if gt $children 0 -}} {{- end -}} {{if gt $children 0}} {{- end -}}
  • {{- else if not .Params.hidden -}}
  • {{- if .Params.shortTitle -}} {{ .Params.shortTitle}} {{- else -}} {{ .Title }} {{- end -}}
  • {{- end -}} {{ end }} {{ end }}