Hello, I have CMS items on my page and wanted to paginate them. Using Webflow’s native pagination feature, I noticed it does not work on production. Works fine in Designer mode’s preview and on staging.
Researching on the forums I saw a fix where you uses custom code to make this work:
<!-- Start seamless-pagination custom code -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.pjax/2.0.1/jquery.pjax.min.js"></script>
<script>
var containerSelector = '#seamless-replace';
$(document).pjax(
'.w-pagination-wrapper a',
containerSelector,
{
container: containerSelector,
fragment: containerSelector,
scrollTo: false,
timeout: 2500,
}
);
// These 3 lines should reinitialize interactions
$(document).on('pjax:end', function() {
Webflow.require('ix2').init();
});
</script>
<!-- End seamless-pagination custom code -->
I attached this code to the page’s before tag and made sure to add the ID seamless-replace to the Collection Wrapper in the settings.
Other settings, made sure pagination is turned on to 25 items per page, limit items toggled on.
What am I doing wrong or what needs to happen to make this work? It’s pretty frustrating that something as simple as pagination does not work out the box and that this is a common issue on the webflow forum that touts itself as a “no-code” platform. Would appreciate any help to resolve.
Here is my site Staging link: STAGING LINK
Here is my site Production link: PRODUCTION LINK