Linking buttons on my site to different filtered versions of the same CMS on wix

Question:
How can I generate and share unique URLs for filtered views of a CMS collection on my Wix site, so users can land directly on pre-filtered project pages from other parts of the website?


Product:
Wix Editor (with CMS and Dataset features)


What are you trying to achieve:
I have a CMS that lists all the projects my company has completed. On the main CMS page, I’ve added input buttons that allow users to filter the project list by category (e.g., Residential, Commercial, Ongoing). However, I also want to place buttons on other pages of the site (e.g., the homepage or service-specific pages) that link directly to a filtered version of the CMS — for example, a version that only shows Commercial projects.

Right now, the filtering works perfectly on the CMS page itself, but since the URL doesn’t change when filters are applied, I can’t create or share unique links that open the page with a specific filter already applied.

I want to create custom links or buttons across the site (or even shareable links externally) that open the CMS page with the relevant filter already applied. This is important for user experience and client access.


What have you already tried:

  • Using input buttons connected to datasets with filters — works locally but doesn’t reflect in the URL.
  • Tried creating multiple versions of the page, each with a different dataset filter — not scalable.
  • Looked through Wix documentation on dataset filters and dynamic pages but couldn’t find a solution for URL-based filtering.
  • Explored Wix Forums and found some partial suggestions involving query parameters, but no end-to-end method.

Additional information:

  • I’m using Wix Studio
  • I’m comfortable using Velo (Wix Code) if that’s needed for a workaround.
  • Ideally, I’d like to use query strings (e.g., ?type=commercial) that are read on page load to apply the correct filter to the CMS dataset dynamically.
  • If there’s a way to use Velo to read the query string and apply a dataset filter accordingly, I’d appreciate guidance or example code.

You can try the Wix Location with Data. Add this code on the CMS List page that has the filter. This code should apply the filter. I am assuming that your CMS collection is called Projects, and it has a field category and dataset name(on page) is dataset1

import wixLocation from 'wix-location';
import wixData from 'wix-data';

$w.onReady(function () {
    let query = wixLocation.query;
    let category = query.category;
    if (category) {
        $w('#dataset1').setFilter(wixData.filter()
            .eq("category", category)
        )
        .then(() => {
            console.log(`Filter applied: category = ${category}`);
        })
        .catch((err) => {
            console.log("Error applying filter:", err);
        });
    }
});

Then on page, just add the buttons linked to the filtered URLs -

Residential: https://your-site.com/projects?category=Residential
Commercial: https://your-site.com/projects?category=Commercial
Ongoing: https://your-site.com/projects?category=Ongoing

Try this, I haven’t tested it yet. If you need a no code version, then you can use the reference field in your CMS and create dedicated pages for these categories and show the CMS items just from these categories