diff --git a/layouts/partials/GetMenu b/layouts/partials/GetMenu index 3f4b24fa72881a80499611762cca619c3b6443a6..5408d56b535001be29e7ffe04ed6494a5ef96b19 100644 --- a/layouts/partials/GetMenu +++ b/layouts/partials/GetMenu @@ -10,4 +10,11 @@ {{ $menu = index site.Data.menus $kind }} {{ end }} +{{ if reflect.IsSlice $menu }} + {{/* LEGACY */}} + {{ $menu = (dict + "items" $menu + ) }} +{{ end }} + {{ return $menu }} \ No newline at end of file diff --git a/layouts/partials/commons/menu.html b/layouts/partials/commons/menu.html index 6debde891764e1fef1b2570c6e540c9f3b683e78..531f292ed865f4fd0c5774873782ab493ddfaefd 100644 --- a/layouts/partials/commons/menu.html +++ b/layouts/partials/commons/menu.html @@ -2,7 +2,8 @@ {{ $items := .items }} {{ $context := .context }} {{ if $kind }} - {{ $items = partial "GetMenu" $kind }} + {{ $menu := partial "GetMenu" $kind }} + {{ $items = $menu.items }} {{ end }} {{- $level := .level -}} {{- $stop := .stop -}}