     {{$menu := (index .ctx.Site.Menus .menuname) }} {{ $currentPage := .ctx
     }} {{ $menuname := .menuname }} {{ range $menu.ByWeight }}
     * {{ .Name }} {{ if and .HasChildren (or ($currentPage.IsMenuCurrent
       $menuname .) ($currentPage.HasMenuCurrent $menuname .)) }}
          {{ range .Children }}
          * {{ .Name }} {{ end }}
       {{ end }} {{end}}
