How to filter many repeaters using one dataset

Question:
So, I created a catalog and this catalog is seperated by tags, which those are “female”, “male”, “kids” and so on.
The products from the catalog are inserted into a dataset I created.
After creating the dataset and inserting some products, I created a dynamic page, type list, and defined the catalog dataset is the source.
I’ve put a repeater to populate the products from the dataset, but I want many repeaters, each one to use for a specific tag, like, one repeater for female, another one for male and it goes.
But I don’t really know how to do this.

So, what can I do to filter these repeater to catch only the tags I want them to use from the dataset?

Wix provides a powerful filtering system within its dataset and repeater components. Here’s how you can leverage this to achieve your goal:

  1. Create Multiple Repeaters:
  • Create a new repeater for each tag category you want to display.
  • Position these repeaters on your page where you want them to appear.
  1. Connect Each Repeater to the Dataset:
  • For each repeater, connect it to the same dataset that contains all your products.
  1. Filter the Data in Each Repeater:
  • Open the Data Source Panel: Click the gear icon next to the dataset in the repeater’s settings.
  • Add a Filter: Click the “Add Filter” button.
  • Set the Filter Condition:
    • Field: Select the field that stores the tag information (e.g., “Category” or “Tag”).
    • Operator: Choose “Equals” or “Contains.”
    • Value: Enter the specific tag you want to filter for (e.g., “female,” “male,” “kids”).

When I do this, it changes all the other repeaters as well, for exemple, if I apply a filter to the dataset like “female”, the male repeater will also show only the female products.

If I understand correctly, you are using two repeaters and two tags. Your goal is to filter and display database items based on the selected tag. For example, when the ‘Male’ filter is applied, only male-related items should be displayed, and the same functionality should apply to the ‘Female’ tag. Is that correct?

If I understand the problem correctly, then all you need to do is add an extra field to your collection (let’s call it a category field). By doing that, you will categorize items between men, women and children so that when you apply tags, it will only filter the category you want to.

  1. Simply add a new field in your collection - make sure its a ‘tag’ type. (You probably already have a tag field, but this will be an additional one). Once you’ve created this field, you can add appropriate tag to each of your items (men, women, children - however you wish to call them).

  2. Now, on your page, create 3 datasets. One for Men, one for Women, and another for Children.

  3. When you filter these datasets, connect them to the tag field you just created and select the appropriate tag from the category field you just created. So the first dataset will only display items with ‘men’ tag, the second dataset will only display items with ‘women’ tag and so forth…

  4. Create 3 separate repeaters and connect each of them to the right dataset. Repeater1 to Dataset1 (for men), etc.

  5. Now add selection tags for each of these repeaters. Repeater1 will have its own set of selection tags, Repeater2 will have its own set of selection tags, and so on. Connect selection tags to the right dataset and the field with tags - not the one we just created but the other tags (such as size, colour, etc…)

AND THAT SHOULD BE IT.
So now, when you, for example, filter men items by size, it won’t affect women or children’s items.

Did this help? :smiling_face:

This is just a matter of changing your perspective and knowing that you can create more than one dataset for a single CMS.

Just go to each Repeater and add it to a new dataset and select the same CMS.

Then you can filter each dataset to your hearts content and they will not affect each other

CMS DJInfo > DJInfo Dataset 2
With filter Show Genre contains Tech

CMS DJInfo> DJInfo Dataset
With filter Show Genre contains Rock

Two datasets from one CMS

1 Like