Hello, I’m trying to use a pagination inside a terms page (e.g. /layouts/tags/terms.html
) because I got many tags.
And I also want to display all my tags sorted by popularity. For the last point, I did:
{{ range .Data.Terms.ByCount}}
...
{{ end }}
And it works fine.
I tried:
{{ range .Data.Terms.ByCount}}
{{ range .Paginator.Pages }}
...
{{ end }}
{{ end }}
But I got “can’t evaluate field Paginator in type hugolib.OrderedTaxonomyEntry” ERROR.
{{ range .Paginator.Pages }}
{{ range .Data.Terms.ByCount}}
...
{{ end }}
{{ end }}
I got no error but no posts are displayed, only the pagination is there.
{{ $paginator := .Paginate .Data.Terms.ByCount }}
{{ range $paginator.Pages }}
...
{{ end }}
I got: “error calling Paginate: cannot convert type hugolib.OrderedTaxonomy to Pages” ERROR.
I tried many others things but I couldn’t figure out how to do display all my posts by popularity with a pagination in my taxonomy terms.html
page.
Do you have more idea ?
Thanks for your response in advance. MaMo