diff --git a/hugolib/node.go b/hugolib/node.go index 1732cac16..ecf5e32fa 100644 --- a/hugolib/node.go +++ b/hugolib/node.go @@ -14,10 +14,11 @@ package hugolib import ( - "github.com/spf13/hugo/helpers" "html/template" "sync" "time" + + "github.com/spf13/hugo/helpers" ) type Node struct { @@ -51,6 +52,9 @@ func (n *Node) HasMenuCurrent(menuID string, inme *MenuEntry) bool { if me.IsSameResource(child) { return true } + if n.HasMenuCurrent(menuID, child) { + return true + } } } diff --git a/hugolib/page.go b/hugolib/page.go index 96de47154..2bd19e13e 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -626,6 +626,9 @@ func (p *Page) HasMenuCurrent(menu string, me *MenuEntry) bool { if child.IsEqual(m) { return true } + if p.HasMenuCurrent(menu, child) { + return true + } } } }