Total number of pages in a paginator?

Looking at the paginator object, I’m trying to figure out how to get the total number of pages of the section?

I can multiply number_pagers with paginate_by but the last pager can have less pages than paginate_by.

What am I missing here?

Stupid me, isn’t it section.pages.length, is it?

Got the chance to work on it tonight, it section.pages | length :slight_smile:

1 Like

Hm, it’s not :frowning:
From the doc

A paginated section gets the same section variable as a normal section page minus its pages. The pages are instead in paginator.pages.

So section.pages | lenght is 0.

So my question still stand: how can I know the total number of pages from a paginated section?

It does look like it’s missing :sweat_smile:

A very easy thing to add though!

1 Like

I’m on it then :slight_smile:

1 Like