Maintain number of post in list on Paginate with exclusion

Hi,
I am using the following

{{ range where .Paginator.Pages "Params.hidden" "ne" "true" }}

To list posts on site excluding the ones that have parameter hidden set.

In config paginate = 10

Instead of getting 10 pages, I got only 8 on the first page, 10 on the second and then 3rd page is generated with no pages in the list.

I know that simple issue, but I am a bit confused now about how to get this sorted?

Select your pages, then paginate.

{{ $p := where site.RegularPages "Type" "post" }}
{{ range (.Paginate $p).Pages }}

And your boolean comparison should not be quoted:
true instead of "true"

Super. Thank you.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.