Use the tree for taxonomy.Pages()

This commit is contained in:
Bjørn Erik Pedersen
2020-02-18 18:49:11 +01:00
parent 36983e6189
commit b2dcd53e3c
3 changed files with 39 additions and 8 deletions

View File

@@ -186,10 +186,7 @@ func (p *pageState) Pages() page.Pages {
case page.KindSection, page.KindHome:
pages = p.getPagesAndSections()
case page.KindTaxonomy:
b := p.treeRef.n
viewInfo := b.viewInfo
taxonomy := p.s.Taxonomies()[viewInfo.name.plural].Get(viewInfo.termKey)
pages = taxonomy.Pages()
pages = p.bucket.getTaxonomyEntries()
case page.KindTaxonomyTerm:
pages = p.bucket.getTaxonomies()
default: