JS hookup to CMS

Hey guys,

I have a codepen I am having trouble hooking up to my CMS. I understand that the HTML “data-cat=.XYZ” needs to talk to the JS but I’m not sure how to set up the .w-dyn-item’ and get my Dynamic List to talk to the buttons under div id=“portfolio-sort”.

Thanks!