Paginating HubDB

Hi @Woodsy
Finally, I got a solution for your question check code below
Please look here I added a code for you https://codepen.io/ajitiosys/pen/MWaaBVq

Here is the modified JavaScript for you Just Copy and Paste

var perPage = 6;

new List("resource-listings", {
 valueNames: ["resource-container"],
 page: perPage,
 plugins: [
 // can not make left and right work on List.js 1.5.0, so I use 1.3.0 instead, which requires List.pagination.js plugin
 ListPagination({
 paginationClass: "pagination-layout",
 left: 2,
 right: 2
 })
 ]
}).on("updated", function(list) {
 var isFirst = list.i == 1;
 var isLast = list.i > list.matchingItems.length - list.page;

 // make the Prev and Nex buttons disabled on first and last pages accordingly
 $(".pagination-prev.disabled, .pagination-next.disabled").removeClass(
 "disabled"
 );
 if (isFirst) {
 $(".pagination-prev").addClass("disabled");
 }
 if (isLast) {
 $(".pagination-next").addClass("disabled");
 }

 // hide pagination if there one or less pages to show
 if (list.matchingItems.length <= perPage) {
 $(".pagination-wrap").hide();
 } else {
 $(".pagination-wrap").show();
 }
});

$(".pagination-next").click(function() {
 $(".pagination-layout .active")
 .next()
 .trigger("click");
});
$(".pagination-prev").click(function() {
 $(".pagination-layout .active")
 .prev()
 .trigger("click");
});

Don’t forget to add Library for updates

https://cdnjs.cloudflare.com/ajax/libs/list.js/1.3.0/list.min.js

https://cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js

Let me know if any questions
Happy to help! Have a nice weekend :slightly_smiling_face:
Thanks!
Ajit Kumar
Any question email me on support@psdtohubspot.com
or Visit: www.psdtohubspot.com