{{ $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" }}
{{ else if eq $target "header" }}