# Paginator issue - possible bug

**URL:** <https://discourse.gohugo.io/t/paginator-issue-possible-bug/40966>\
**Category:** support\
**Tags:** pagination\
**Created:** [October 16, 2022, 6:11pm UTC](https://discourse.gohugo.io/t/paginator-issue-possible-bug/40966 "2022-10-16T18:11:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [October 16, 2022, 6:11pm UTC](https://discourse.gohugo.io/t/paginator-issue-possible-bug/40966/1 "2022-10-16T18:11:22Z")

</div>

I have an issue with pagination being built on the homepage, even though no call for pagination is made in the template, except in the header as an if statement. Essentially, I can navigate to page/2/, page/3/ etc for all the pages.

```auto
{{ .Title }}{{if .Paginator}}{{if gt .Paginator.PageNumber "1"}} - Page {{
      .Paginator.PageNumber }}{{end}}{{end}}

```

This small piece of code initializes the pagination. I would expect it not to. My intention is to merely check if there is pagination.

The code is fairly simple and self explanatory. Am I doing it wrong, or does this look like a bug?

I’ve circumvented this by having a unique base template for my blog section, and including the code there, instead of the default base template. But would like people’s thoughts on this. I’m tempted to submit a bug report.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [October 16, 2022, 6:23pm UTC](https://discourse.gohugo.io/t/paginator-issue-possible-bug/40966/2 "2022-10-16T18:23:12Z")

</div>

> [@Jonathan\_Griffin](#):
>
> I would expect it not to.

[https://gohugo.io/templates/pagination/#list-paginator-pages](https://gohugo.io/templates/pagination/#list-paginator-pages)

> For a given **Page** , it’s one of the options above. The `.Paginator` is static and cannot change once created.
> 
> If you call `.Paginator` or `.Paginate` multiple times on the same page, you should ensure all the calls are identical. Once _either_ `.Paginator` or `.Paginate` is called while generating a page, its result is cached, and any subsequent similar call will reuse the cached result. This means that any such calls which do not match the first one will not behave as written.

This describes the problem in a little more detail:  
[https://discourse.gohugo.io/t/determine-if-current-page-is-result-of-pagination/37494/4](https://discourse.gohugo.io/t/determine-if-current-page-is-result-of-pagination/37494/4)

This describes a strategy (with example) for doing what you want to do:  
[https://discourse.gohugo.io/t/control-pagination-and-page-collections-from-baseof-html/37643/8](https://discourse.gohugo.io/t/control-pagination-and-page-collections-from-baseof-html/37643/8)
