Taxonomy without paging pages

I replaced the top taxonomy list page with my customized template (layout=).
But the paginator creates the tree under the paginatepath.

I found this solution to limit it to one page:

Part of my customized list template

{{ $paginator := .Paginate (where .Pages "Type" "null") }}
{{ template "_internal/pagination.html" . }}

It ony generates paginatepath/1/index.html.

Is there a solution to switch pagination complete off for a single taxonomy?

My solution generates only an empty list.
I want to generate a NULL-List, so .Paginate will do nothing.

Thnik, only @bep knows it.

Isn’t $paginator a slice or collection? It should be possible to check BEFORE you load the template, if the variable contains 1 or more items. Something like if paginator count is not zero then load template.

This reads as if you could check $paginator.Pages for the count.

It doen’t matter, I always get one page file.
I wanted to switch OFF the paging for this section.

OK - nice to have. One file doesn’t matter.

my second / shorter solution

{{ .Paginate nil }}

makes only page/1/index.html

Q: @bep can we change pagination?

- .Paginate nil : page collection is NULL - don’t generate pages
- .Paginate : page collection exists with zero or more pages - generate paging

OK it’s a hack**


I use tags on every page. The tags generate the meta/keywords in a page (SEO).
The paging of taxonomy pages generates a lot of files. I don’t need it.
(No .Prev / .Next usage).

Having a single paging file does not break any paging in taxonomy templates.

Did you found a solution for this?