Only add root sections to the section pages menu

Fixes #12399
This commit is contained in:
Bjørn Erik Pedersen
2024-04-20 16:51:56 +02:00
parent 004b694390
commit 06d248910c
2 changed files with 35 additions and 1 deletions

View File

@@ -659,7 +659,7 @@ func (s *Site) assembleMenus() error {
if sectionPagesMenu != "" {
if err := s.pageMap.forEachPage(pagePredicates.ShouldListGlobal, func(p *pageState) (bool, error) {
if p.IsHome() || !p.m.shouldBeCheckedForMenuDefinitions() {
if p.Kind() != kinds.KindSection || !p.m.shouldBeCheckedForMenuDefinitions() {
return false, nil
}