Skip to content

Instantly share code, notes, and snippets.

@memetican
Created September 10, 2023 23:03
Show Gist options
  • Save memetican/c697e485ef53b1bcff9080f4dc37709a to your computer and use it in GitHub Desktop.
Save memetican/c697e485ef53b1bcff9080f4dc37709a to your computer and use it in GitHub Desktop.
fs-cms-load
<script>
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);
// Re-init forms
Webflow.require('forms').ready();
});
},
]);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment