aboutsummaryrefslogtreecommitdiffhomepage
path: root/navigation
diff options
context:
space:
mode:
authorDavid Jones <[email protected]>2020-11-22 13:09:59 -0800
committerGitHub <[email protected]>2020-11-22 22:09:59 +0100
commit8f5c9a747fcebb02bb99f5de272046411eb15370 (patch)
treeda9d219c001c2ddccafe8f5c5d05d962bf8c6275 /navigation
parente4fcb672ed8bae21fd9780292b54fea3040dd877 (diff)
downloadhugo-8f5c9a747fcebb02bb99f5de272046411eb15370.tar.gz
hugo-8f5c9a747fcebb02bb99f5de272046411eb15370.zip
Add menu params
Fixes #7951
Diffstat (limited to 'navigation')
-rw-r--r--navigation/menu.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/navigation/menu.go b/navigation/menu.go
index ae2e0e4ff..498078e34 100644
--- a/navigation/menu.go
+++ b/navigation/menu.go
@@ -39,6 +39,7 @@ type MenuEntry struct {
Weight int
Parent string
Children Menu
+ Params maps.Params
}
func (m *MenuEntry) URL() string {
@@ -127,6 +128,8 @@ func (m *MenuEntry) MarshallMap(ime map[string]interface{}) {
m.Identifier = cast.ToString(v)
case "parent":
m.Parent = cast.ToString(v)
+ case "params":
+ m.Params = maps.ToStringMap(v)
}
}
}