{{- $page := .page }}
{{- $menuID := .menuID }}
{{ $list := index site.Menus $menuID }}
{{ if eq $page.Params.menu_order "name"}}
{{ $list = (index site.Menus $menuID).ByName }}
{{ end}}
{{- with $list }}
{{- end }}
{{- define "partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- partial "menu/item.html" (dict "page" $page "item" .) }}
{{- end }}
{{- end }}
{{- define "partials/inline/menu/inline.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $pageItem := $page.GetPage .URL}}
{{- if $pageItem.Params.menu_item_override }}
{{ $pageItem.Params.menu_item_override }}
{{- else}}
{{ .Name }}
{{- end }}
{{- partial "menu/new-or-up.html" (dict "page" ($pageItem)) }}
{{- end }}
{{- end }}