Hey,
We’ve built filter system utilising Pagination, Nest and Filter, however, some of the items from the CMS collection aren’t pulling through.
I’ve displayed the information within the “meta” class that should correctly filter on /apps. If you visit the CMS page, you’ll notice that there’s more items (BigCommerce) that should be pulling through to /apps.
/apps page - All eCommerce Tools, Software & Vendors - eCommerce Tech
CMS for /apps page - Verifone (was 2Checkout) - Reviews, Information and Alternatives
We’ve also utilised CMS Bridge to push data to Webflow, however, I’ve manually added the filter fields inside Webflow (as I thought it may be similar to how videos link in Webflow when they don’t pull through), sadly the issue is still present.
We also use a custom script to add some data to the pagination (for SEO improvement) (listed below), I’ve disabled this and the nested data doesn’t pull in so I don’t think this is causing any issues.
Script
window.fsAttributes = window.fsAttributes || [];
window.fsAttributes.push([
'cmsload',
(listInstances) => {
const [listInstance] = listInstances;
getPaginationDataLoad();
updatePage();
listInstance.on('renderitems', (renderedItems) => {
getPaginationDataLoad();
updatePage();
});
},
]);
function updatePage() {
let pageTextWrapper = $(".page-number");
let current = $(".pagination-btn-number.w--current").text();
let last = $(".pagination-btn-number:last-of-type").text();
if (current.length && last.length) {
$("#page_number").text(current);
$("#page_number_total").text(last);
pageTextWrapper.css("opacity", "1")
} else {
$(".page_number-wrapper").remove();
}
}
function getPaginationDataLoad() {
const paginationBase = $(".w-pagination-previous").attr("href");
$("[fs-cmsload-element=page-button]").each(function () {
const pageNumber = +$(this).text();
const newHref = `${paginationBase.split('=')[0]}=${pageNumber}`;
if (!$(this).attr("href")) {
$(this).attr("href", newHref);
}
$(this).on("click", function (event) {
event.preventDefault();
$(this).attr("href", newHref);
});
});
const currentUrl = $(".pagination-btn-number.w--current");
currentUrl.removeAttr("href");
}
Thanks for any assistance with this!
Best wishes,
Dan.