aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/page__menus.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/page__menus.go')
-rw-r--r--hugolib/page__menus.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/hugolib/page__menus.go b/hugolib/page__menus.go
index 5bed2bc03..1666036ce 100644
--- a/hugolib/page__menus.go
+++ b/hugolib/page__menus.go
@@ -62,8 +62,22 @@ func (p *pageMenus) init() {
p.p,
)
+ params := p.p.Params()
+
+ var menus any
+ var ok bool
+
+ if p.p.m.pageConfig.Menus != nil {
+ menus = p.p.m.pageConfig.Menus
+ } else {
+ menus, ok = params["menus"]
+ if !ok {
+ menus = params["menu"]
+ }
+ }
+
var err error
- p.pm, err = navigation.PageMenusFromPage(p.p)
+ p.pm, err = navigation.PageMenusFromPage(menus, p.p)
if err != nil {
p.p.s.Log.Errorln(p.p.wrapError(err))
}