mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Make suure SectionPagesMenu setting is always loaded per language
This commit is contained in:
@@ -880,7 +880,7 @@ func (p *Page) getParam(key string, stringToLower bool) interface{} {
|
|||||||
|
|
||||||
func (p *Page) HasMenuCurrent(menu string, me *MenuEntry) bool {
|
func (p *Page) HasMenuCurrent(menu string, me *MenuEntry) bool {
|
||||||
menus := p.Menus()
|
menus := p.Menus()
|
||||||
sectionPagesMenu := viper.GetString("SectionPagesMenu")
|
sectionPagesMenu := helpers.Config().GetString("SectionPagesMenu")
|
||||||
|
|
||||||
// page is labeled as "shadow-member" of the menu with the same identifier as the section
|
// page is labeled as "shadow-member" of the menu with the same identifier as the section
|
||||||
if sectionPagesMenu != "" && p.Section() != "" && sectionPagesMenu == menu && p.Section() == me.Identifier {
|
if sectionPagesMenu != "" && p.Section() != "" && sectionPagesMenu == menu && p.Section() == me.Identifier {
|
||||||
|
Reference in New Issue
Block a user