cmsload
Attribute
Set up load more functionality in Webflow CMS. User click, infinite, pagination, and render-all options available.
CDN Import
<script async src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-cmsload@1/cmsload.js"></script>
JavaScript API
You can access the cmsload
instances by pushing a callback into the window.fsAttributes
object:
window.fsAttributes = window.fsAttributes || [];
window.fsAttributes.push([
'cmsload',
(listInstances) => {
console.log('cmsload Successfully loaded!');
const [listInstance] = listInstances;
listInstance.on('renderitems', (renderedItems) => {
console.log(renderedItems);
});
},
]);
The callback passes an array with all the CMSList
instances on the page.
To see more about the CMSList
instance, check the cmscore
docs.