# Multiple pagination objects on one page

**URL:** <https://forum.getkirby.com/t/multiple-pagination-objects-on-one-page/8597>\
**Category:** Questions\
**Tags:** v2\
**Created:** [September 22, 2017, 8:44pm UTC](https://forum.getkirby.com/t/multiple-pagination-objects-on-one-page/8597 "2017-09-22T20:44:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxwell.ryan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/maxwell.ryan/32/8736_2.png) [@maxwell.ryan](https://forum.getkirby.com/u/maxwell.ryan)\
**Post date:** [September 22, 2017, 8:44pm UTC](https://forum.getkirby.com/t/multiple-pagination-objects-on-one-page/8597/1 "2017-09-22T20:44:55Z")

</div>

Hi all,

I’ve been having some problems with the pagination object in that I have three columns on a page, all of which require pagination and load more buttons. You can see here: [Content Free | RCA Visual Communication online thoughts and forum](http://content-free.net/index.php) (click through the slightly crazy visuals…). Each of these columns retrives the content via versions of the following:

```
    <div class="column">
      <hr>
      <div class="innercolumn">
        <div class="innerscroll">
          <h1><?php echo page('news')->title()->html() ?></h1>
          <?php $numbernews = page('news')->perpage()->int() ?>

          <? $newsposts = page('news')->children()->visible()->flip()->paginate($numbernews) ?>

          <section id="newsfeed">
              <? foreach($newsposts as $newspost): ?>
                  <? snippet('newspost', compact('newspost')) ?>
              <? endforeach ?>
              <div id="news-load-area"></div>
          </section>
       
          <div id="newsbutton">
              <button id="loadnews"type="button" data-href="<? echo $newsposts->pagination()->nextPageURL() ?>" title="Load more blogposts">
                Load more <span><i class="fa fa-refresh" aria-hidden="true"></i></span>
              </button>
          </div>
        </div>
      </div>
    </div>

```

and each column loads further content into it via a loading button and this code:

```
$(document).on('click touchstart', '#loadnews', function() {

            var loadnews = $('#loadnews');
            var newshref = loadnews.data('href');
            console.log("newsbuttonclicked");

            $('#news-load-area').load(newshref + 'body #newsfeed .news', function() {
                $(this).children().unwrap();
                $('#newsfeed').append('<div id="news-load-area"></div>');
                console.log("newsfeedloaded");
            });

            $('#newsbutton').load(newshref + '#newsbutton #loadnews', function(){
                console.log("newsbuttonloaded");
              var newshrefnew = $('#loadnews').data('href');

              if (newshref === newshrefnew) {
                $("#loadnews").remove();
                console.log("newsbuttonremoved");
              };

            });
            
        });

```

So the .get drags in the new content .etc which works fine. However it only works fine when all the columns have content on each of the paginated pages. i.e. so on page:3 all columns would still have to have had enough content to necessitate that page:3 otherwise it will throw an error page.

Is there any way to seperate out the pagination objects for each one so they’re not tied to each other? (hopefully I’ve explained it well enough…)

Thanks!!  
Max

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 23, 2017, 6:50am UTC](https://forum.getkirby.com/t/multiple-pagination-objects-on-one-page/8597/2 "2017-09-23T06:50:21Z")

</div>

I think we had this problem before and I think it was solved using different parameters for each pagination object.

---

<div class="post-metadata">

**Author:** ![maxwell.ryan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/maxwell.ryan/32/8736_2.png) [@maxwell.ryan](https://forum.getkirby.com/u/maxwell.ryan)\
**Post date:** [September 23, 2017, 1:10pm UTC](https://forum.getkirby.com/t/multiple-pagination-objects-on-one-page/8597/3 "2017-09-23T13:10:42Z")

</div>

Hi texnixe, thanks for the reply. What do you mean by using different parameters for the pagination object sorry? Apologies if it’s something very simple…

Best,  
Max

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 23, 2017, 1:56pm UTC](https://forum.getkirby.com/t/multiple-pagination-objects-on-one-page/8597/4 "2017-09-23T13:56:08Z")

</div>

See this topic: [Pagination error with 5 items, works with 10](https://forum.getkirby.com/t/pagination-error-with-5-items-works-with-10/4108/8)

---

<div class="post-metadata">

**Author:** ![maxwell.ryan](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/maxwell.ryan/32/8736_2.png) [@maxwell.ryan](https://forum.getkirby.com/u/maxwell.ryan)\
**Post date:** [September 24, 2017, 6:37pm UTC](https://forum.getkirby.com/t/multiple-pagination-objects-on-one-page/8597/5 "2017-09-24T18:37:14Z")

</div>

Great thanks! Worked like a charm

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:32pm UTC](https://forum.getkirby.com/t/multiple-pagination-objects-on-one-page/8597/6 "2025-02-06T17:32:03Z")

</div>


