Detalhes do pacote

@finsweet/attributes-cmsload

finsweet3031.12.0

Load More Webflow CMS items on the page after the page has loaded.

webflow, attributes, no code

readme (leia-me)

cmsload Attribute

Set up load more functionality in Webflow CMS. User click, infinite, pagination, and render-all options available.

CDN Import

<!-- [Attributes by Finsweet] CMS Load -->
<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!');

    // The callback passes a `listInstances` array with all the `CMSList` instances on the page.
    const [listInstance] = listInstances;

    // The `renderitems` event runs whenever the list renders items after switching pages.
    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.