mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
@@ -41,20 +41,11 @@ type MenuQueryProvider interface {
|
||||
IsMenuCurrent(menuID string, inme *MenuEntry) bool
|
||||
}
|
||||
|
||||
func PageMenusFromPage(p Page) (PageMenus, error) {
|
||||
params := p.Params()
|
||||
|
||||
ms, ok := params["menus"]
|
||||
if !ok {
|
||||
ms, ok = params["menu"]
|
||||
}
|
||||
|
||||
pm := PageMenus{}
|
||||
|
||||
if !ok {
|
||||
func PageMenusFromPage(ms any, p Page) (PageMenus, error) {
|
||||
if ms == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
pm := PageMenus{}
|
||||
me := MenuEntry{}
|
||||
SetPageValues(&me, p)
|
||||
|
||||
|
Reference in New Issue
Block a user