CMS (Formerly Content Manager): Using Datasets to Sort and Filter Live Site Content

2 min read
Add sort and filter conditions to datasets to control which items appear in the connected elements, and the order in which they appear on your live site. This does not have any effect on how your items appear in your collection view

New datasets experience:
In Wix Studio, we've moved datasets to the Inspector panel on the right to make them easier for you to use. Learn more about the new datasets experience in Wix Studio
A screenshot showing the Dataset Settings panel and the Edit Filter panel.

Adding sort conditions to your dataset to sort the items on your page

Adding a sort condition to a dataset on your page controls the order in which items display in repeaters, tables, and galleries. By default, the order is based on the date the item was added to the collection. This date appears in the Date_Created field in your collection.
This sort condition affects the order of the content in the elements the dataset connects to. The order of the content in your collection view is not changed. Only datasets with Read-only or Read-Write statuses can include sort conditions. 

To add a sort condition to your dataset:

  1. Click the dataset in the Editor. 
  2. Click Settings.
  3. Click + Add Sort.
  4. Define the following parameters:
    • Field: The field in your collection you want to sort by. 
    • Order: The order in which you want the items to appear.
  5. Click Add Sort.
A screenshot of the dataset settings panel, highlighting the + Add Sort options.

Adding filters to your dataset to exclude items from your page

Add filters to your datasets to choose which items are included or excluded from the connected elements (e.g. repeaters, tables, galleries). This does not affect which items appear in your collection view in the CMS. Only datasets set to Read-only or Read-Write can be filtered.

To add a filter to your dataset:

  1. Click the dataset in the Editor. 
  2. Click Settings.
  3. Click + Add Filter.
  4. Add filters using the following options:
    • Field: The field in your collection you want to filter by. 
    • Condition: The condition you want to apply.
    • Value: The value you want the filter to match.
  5. Click Add Filter.
A screenshot of the dataset settings panel, highlighting the + Add Filter options.