And I want to paginate those subsections in section docs. I have searched the forum and I find a solution like:
{{ $ps := .Paginate .Sections }}
{{ range $ps.Pages }}
{{ .Title }}
{{ end }}
But when I use this, there is a Pager indeed. However, when I print $ps.Pages, the result is Pages(0). There is no pages in the Pager. And if I print .Sections, it has the right info I need. It seems that the solution is not available now. So I am looking for an avaliable solution.
If you call .Paginator or .Paginate multiple times on the same page, you should ensure all the calls are identical. Once either.Paginator or .Paginate is called while generating a page, its result is cached, and any subsequent similar call will reuse the cached result. This means that any such calls which do not match the first one will not behave as written.