From 27d3d64e50c3a5f7c4e438f43f574b77f4ad682b Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Fri, 3 Jan 2020 11:30:34 +0100 Subject: [PATCH] Build menus from .Site.Menus.main if it exists, otherwise build it automatically with home and sections as before. --- layouts/partials/menu.html | 17 ++++++++++++++--- layouts/partials/mobilemenu.html | 17 ++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 4bad551..54caa71 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -1,15 +1,26 @@ -{{ $currentSection := .Section -}} -{{ $currentID := "" -}} -{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}} diff --git a/layouts/partials/mobilemenu.html b/layouts/partials/mobilemenu.html index af45ab8..96f9088 100644 --- a/layouts/partials/mobilemenu.html +++ b/layouts/partials/mobilemenu.html @@ -1,6 +1,3 @@ -{{ $currentSection := .Section -}} -{{ $currentID := "" -}} -{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
{{ i18n "menu_mobile" }} @@ -12,12 +9,26 @@