Items to paginate per section


Is the number of items to paginate in a section limited to a Global site setting? Can we not set the number of items we would like paginate by on a per section basis.

Ex: I may have a blog which will have 5 items per page but a portfolio that may have 10 items per page.

Any possibilities for this? i don’t see this option in the docs anywhere.

The doc is correct. It’s currently a global setting.

I can see your use case … but first someone should think of a key to use to identify a Node (home page, sections, taxonomies).

This is currently, as I see it, lacking, and could be very useful in other situations too (I see a lot of if Url == ‘/’ to identify the home page).

I do think a global paginate value is useful but a way to override it at the section level would be great. Could it not be as simple as passing the number of pages to the paginate function somehow?

{ $paginator := .Paginate (where .Data.Pages “Type” “post”) 5 }}

Not sure if i’m getting the syntax right here.

That would work and should be pretty straight forward to implement.

Any objections, anyone?

Pull requests are welcome, as long as you do not mess with my 100% test coverage in paginator.go :slight_smile:



You’re the best!