mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 09:21:59 -05:00
parent
dbb0c1cfc9
commit
1f6e0de361
2 changed files with 4 additions and 2 deletions
|
@ -1092,7 +1092,7 @@ func (p *Page) getParam(key string, stringToLower bool) interface{} {
|
||||||
|
|
||||||
func (p *Page) HasMenuCurrent(menuID string, me *MenuEntry) bool {
|
func (p *Page) HasMenuCurrent(menuID string, me *MenuEntry) bool {
|
||||||
|
|
||||||
sectionPagesMenu := helpers.Config().GetString("SectionPagesMenu")
|
sectionPagesMenu := p.Site.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 == menuID && p.Section() == me.Identifier {
|
if sectionPagesMenu != "" && p.Section() != "" && sectionPagesMenu == menuID && p.Section() == me.Identifier {
|
||||||
|
|
|
@ -191,6 +191,7 @@ type SiteInfo struct {
|
||||||
LanguagePrefix string
|
LanguagePrefix string
|
||||||
Languages helpers.Languages
|
Languages helpers.Languages
|
||||||
defaultContentLanguageInSubdir bool
|
defaultContentLanguageInSubdir bool
|
||||||
|
sectionPagesMenu string
|
||||||
|
|
||||||
pathSpec *helpers.PathSpec
|
pathSpec *helpers.PathSpec
|
||||||
}
|
}
|
||||||
|
@ -937,6 +938,7 @@ func (s *Site) initializeSiteInfo() {
|
||||||
LanguagePrefix: languagePrefix,
|
LanguagePrefix: languagePrefix,
|
||||||
Languages: languages,
|
Languages: languages,
|
||||||
defaultContentLanguageInSubdir: defaultContentInSubDir,
|
defaultContentLanguageInSubdir: defaultContentInSubDir,
|
||||||
|
sectionPagesMenu: lang.GetString("sectionPagesMenu"),
|
||||||
GoogleAnalytics: lang.GetString("googleAnalytics"),
|
GoogleAnalytics: lang.GetString("googleAnalytics"),
|
||||||
BuildDrafts: viper.GetBool("buildDrafts"),
|
BuildDrafts: viper.GetBool("buildDrafts"),
|
||||||
canonifyURLs: viper.GetBool("canonifyURLs"),
|
canonifyURLs: viper.GetBool("canonifyURLs"),
|
||||||
|
@ -1412,7 +1414,7 @@ func (s *Site) assembleMenus() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sectionPagesMenu := s.Language.GetString("sectionPagesMenu")
|
sectionPagesMenu := s.Info.sectionPagesMenu
|
||||||
sectionPagesMenus := make(map[string]interface{})
|
sectionPagesMenus := make(map[string]interface{})
|
||||||
//creating flat hash
|
//creating flat hash
|
||||||
pages := s.Pages
|
pages := s.Pages
|
||||||
|
|
Loading…
Reference in a new issue