# Pagination within load more

**URL:** <https://forum.getkirby.com/t/pagination-within-load-more/13064>\
**Category:** Questions\
**Tags:** v3\
**Created:** [February 26, 2019, 11:06am UTC](https://forum.getkirby.com/t/pagination-within-load-more/13064 "2019-02-26T11:06:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![illycz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/illycz/32/5190_2.png) [@illycz](https://forum.getkirby.com/u/illycz)\
**Post date:** [February 26, 2019, 11:06am UTC](https://forum.getkirby.com/t/pagination-within-load-more/13064/1 "2019-02-26T11:06:20Z")

</div>

I have implemented pagination like this:  
 ![image](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/4/49e0a39140e6b986fb776f2b4c170bddb0169174.png)

I tried load more articles within [https://infinite-scroll.com/](https://infinite-scroll.com/) library, but I don’t know how to update pagination component (current page, hellips etc.)

Is it possible only with Kirby? Any suggestions welcome.

Thanks a lot

---

<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:** [February 26, 2019, 11:20am UTC](https://forum.getkirby.com/t/pagination-within-load-more/13064/2 "2019-02-26T11:20:48Z")

</div>

Kirby’s code happens on the server and the server knows nothing of what you do on the client side with your JavaScript unless you make an Ajax call to tell your server that you want something else now. So you’d have to update your pagination via an Ajax call to the server or do it all on the frontend.

But somehow that looks a bit “doppelt gemoppelt” (redundant) to me, using a pagination and the load more button that are both supposed to do the same thing, right?

---

<div class="post-metadata">

**Author:** ![illycz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/illycz/32/5190_2.png) [@illycz](https://forum.getkirby.com/u/illycz)\
**Post date:** [February 26, 2019, 11:28am UTC](https://forum.getkirby.com/t/pagination-within-load-more/13064/3 "2019-02-26T11:28:10Z")

</div>

I don’t know what is “doppelt gemoppelt” 🙂 but pagination reload the page and load more button only append posts from next page without reloading and update pagination. So from UX perspective is not exactly same.

Can I use only Kirby Ajax and controller for this functionalities?

---

<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:** [February 26, 2019, 11:47am UTC](https://forum.getkirby.com/t/pagination-within-load-more/13064/4 "2019-02-26T11:47:44Z")

</div>

> [@illycz](#):
>
> but pagination reload the page and load more button only append posts from next page without reloading and update pagination.

Yes, sure, but the technical difference is not interesting for the user and only confusing, I think. If it was my site, I’d use progressive enhancement on the pagination and load the next page via Ajax (i.e. without a page reload) if JS is available, without the additional button.

---

<div class="post-metadata">

**Author:** ![illycz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/illycz/32/5190_2.png) [@illycz](https://forum.getkirby.com/u/illycz)\
**Post date:** [February 26, 2019, 12:02pm UTC](https://forum.getkirby.com/t/pagination-within-load-more/13064/5 "2019-02-26T12:02:10Z")

</div>

And how Can I implement this, is there some tutorial? Classic pagination with Ajax loading support?

---

<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:** [February 26, 2019, 12:07pm UTC](https://forum.getkirby.com/t/pagination-within-load-more/13064/6 "2019-02-26T12:07:50Z")

</div>

There is no specific Kirby tutorial for this, but regarding the Ajax stuff, there are two tutorials in the Kirby 2 cookbook, the rest you can find using Google. Basically, it is nothing but a normal page load via Ajax using the History Api to make the back/next browser buttons work. There’s also a thread here in the forum somewhere with the history Api, you should be able to find this using search.
