Paginator paginate across excluded pages

I am experiencing an issue that I tough that I got sorted through this (Maintain number of post in list on Paginate with exclusion - #2 by jmooring)

in layouts\index.html I got:

{{ $filteredPages := where .Site.RegularPages ".Params.hidden" "!=" true }}
{{ $paginator := .Paginate $filteredPages }}
{{ range $i, $e := $paginator.Pages }}

ps. I need range $i, $e for other purpose there.

But pages with hidden: true still appearing in output.

example:

---
title: "Contact"
url: '/contact/'
page: true
hidden: true
omitDate: true
nocomment: true
hideDescription: true
rss_exclude: true
---

content

Unsure whats wrong,
any advise?

I think it may be issue with paginate cache, but I am not using anywhere else the .Paginate.

Nevermind.

I did, indeed, use a paginator in the header which caused a cache issue as my call was indeed second call for paginator.

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