Is it possible to have different values for “paginate” for each section? Right now paginate is a “.site” parameter. Is it possible to do this without hacking the pagination template?
Longer version:
I would like each section of my site to have different values of the parameters typically associated with the site’s global config. Ideally, I would like to be able to set “site” parameters in the frontmatter of my “_index.md” files. I would prefer not to have to make custom templates for pagination.
Why does setting a dummy variable change the behavior of the paginator?
I’d like to understand why this works, so I can do so similar things later.
(I did confirm that it does work - but it seems like voodoo. I am not sure why setting an unused variable has this effect. And it works even though the theme I am using defines its own “pagination.html” that is called via partial, not template)
Both $ignore and $paginate will contain exactly the same.
If you look at the built-in pagination template you will see that it just simply invokces .Paginate – and if you had not invoked it first with a different page size (1234), it would have created one with the configured value for paginate.
Great Explanation! That helps explain a lot of things and gives me ideas on how to address other issues.
A very newbie question: do I need to get the source release in order to see the “built in” templates like
“_internal/pagination.html” or is there another way?