Hi everybody
i’m stuck with the cms nest tool, i’m doing it right in a simple page with “nations” and related brewery. i’m using it to show more than 5 item as a subcollection.
I than try to replicate the functionality inside my cms filter page but without achieving the filtering, all the other filters work fine, the nested one no.
if i remove the custom attributes from the collection it filters like it should
could you help me?
https://bevande-cuni.webflow.io/vini
hey @gianluca! can you share a read-only link?
https://bevande-cuni.webflow.io/vini
here, under the accordion “regione”, if you scroll down you’ll see “lombardia” with the multireference to the “zone” collection
This happens because CMS Filter is initialized before the items are nested. You can prevent CMS Filter with these settings on the Attribute script defer fs-attributes-preventload='true'
and use the CMS Nest callback to wait for the items to be nested and initialize the filter.
<script>
window.fsAttributes = window.fsAttributes || [];
window.fsAttributes.push([
'cmsnest',
(listInstances) => {
console.log('cmsnest Successfully loaded!');
window.fsAttributes.cmsfilter.init();
},
]);
</script>
thank you, super fast as always
1 Like