summaryrefslogtreecommitdiff
path: root/layouts/partials/menu.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/menu.html')
-rw-r--r--layouts/partials/menu.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
index f70ac28..47f1d44 100644
--- a/layouts/partials/menu.html
+++ b/layouts/partials/menu.html
@@ -1,7 +1,11 @@
{{- $page := .page }}
{{- $menuID := .menuID }}
-{{- with index site.Menus $menuID }}
+{{ $list := index site.Menus $menuID }}
+{{ if eq $page.Params.menu_order "name"}}
+ {{ $list = (index site.Menus $menuID).ByName }}
+{{ end}}
+{{- with $list }}
<nav>
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}