Streaming live at 10am (PST)

Filter categories for CMS dynamic slider

hey there @Finsweet

i’ve integrated your code for the dynamic cms slider on my website and am trying to filter categories within the slider collection but not having any luck.

here’s the code:

<script src="https://cdn.finsweet.com/files/cmslibrary-v1.8.js"></script>
<script>
// immediately/self invoked function. This function executes right away
(function() {
// create a new Library instance and store it in a variable called "fsComponent"
var fsComponent = new FsLibrary('.dynamic-collection-list') // Collection List class

// define filter groups in an array and store it in a variable called myFilters
var myFilters = [
  {
    filterWrapper: '.work__button-container', // parent wrapper of filter group
    filterType: 'exclusive'
  }
]

// run the filter Library component on your instance
fsComponent.filter({
  filterArray: myFilters // variable of the array we created above	
})

// run Slider component on our instance
fsComponent.slider({
  sliderComponent: '.slider', // Webflow slider component
  resetIx: true // reset IX
})
})();
</script>

Can you see why? I haven’t seen any examples of somebody combining the dynamic slider with filtering, so any help would be appreciated. or if you have a different idea for how to go about achieving this, i’m all ears.

thanks,
D

https://preview.webflow.com/preview/handford?utm_medium=preview_link&utm_source=designer&utm_content=handford&preview=a844c298d6332eb34dd2a367fd4008d4&mode=preview