{{ $current := .current }} {{ template "menu-file" dict "sect" .source "current" $current "site" $current.Site "target" .target }} {{ define "menu-file" }} {{ $current := .current }} {{ $site := .site }} {{ $target := .target }} {{ range sort (default (seq 0) .sect) "weight" }} {{ if isset . "ref" }} {{ $this := $site.GetPage .ref }} {{ $isCurrent := eq $current $this }} {{ $icon := default false .icon }} {{ if eq $target "footer" }} {{ if $icon }} {{ end }} {{ .name }} {{ else if eq $target "header" }}
  • {{ if $icon }} {{ end }} {{ .name }}
  • {{ end }} {{ end }} {{ end }} {{ end }}