Add Page.GetTerms

Fixes #6905
This commit is contained in:
Bjørn Erik Pedersen
2020-02-19 09:16:27 +01:00
parent 82029c1ec9
commit fa520a2d98
8 changed files with 82 additions and 15 deletions

View File

@@ -252,6 +252,10 @@ type PageWithoutContent interface {
maps.Scratcher
RelatedKeywordsProvider
// GetTerms gets the terms of a given taxonomy,
// e.g. GetTerms("categories")
GetTerms(taxonomy string) Pages
DeprecatedWarningPageMethods
}

View File

@@ -174,6 +174,10 @@ func (p *nopPage) GetParam(key string) interface{} {
return nil
}
func (p *nopPage) GetTerms(taxonomy string) Pages {
return nil
}
func (p *nopPage) GitInfo() *gitmap.GitInfo {
return nil
}

View File

@@ -222,6 +222,10 @@ func (p *testPage) GetParam(key string) interface{} {
panic("not implemented")
}
func (p *testPage) GetTerms(taxonomy string) Pages {
panic("not implemented")
}
func (p *testPage) GetRelatedDocsHandler() *RelatedDocsHandler {
return relatedDocsHandler
}