Pro Gallery - Categories/Filters?

Hi @evantaylorstudios ,

So here is the solution I found for filtering a pro gallery, I made a video that explains it, basically you are using the content manager to populate your gallery and using a dataset to filter it, its in this video here:

https://www.screencast.com/t/q3UUW0Fx

Here is the code:



import wixData from 'wix-data';

$w.onReady(function () {

    $w('#dataset1').onReady(() => {
        $w('#button1').onClick((event) => {
            let filter = event.target.label;

            if (filter === 'All') {
                $w('#dataset1').setFilter(wixData.filter())
            } else {
                $w('#dataset1').setFilter(wixData.filter()
                    .eq('category', filter)
                )
            }

        })
    })

});

hope this is useful to you!