CMS (Formerly Content Manager): Adding Filters and Sorts to Datasets to Control Live Site Content

6 min read
Add filters to datasets to only show certain items in their connected page elements. To choose the order in which the items appear, add sort conditions to the datasets. In both cases, you choose which collection fields to use for filtering or sorting the collection items. 

Filters and sorts you add to the dataset have no effect on how items appear in your collection views. If you enable the "Mirror on Site" feature to use the collection's order on your live site, sorts you add to the dataset override the order from your mirrored collection. You can only apply filters and sorts to datasets that are set to the Read or Read & Write mode.


Adding filters to your dataset

Add filters to datasets to choose which collection items appear in the connected elements (e.g. repeaters, galleries, input elements). Dataset filters do not affect the items that appear in your collection views. You can add filters to your collection views if you want to only see certain items in the collections, without affecting live site content.
Wix Editor
Editor X
Studio Editor
  1. Go to your editor.
  2. Select the relevant dataset. 
  3. Click Settings
  4. Click + Add Filter in the Filter section. 
  5. Click the Field drop-down and select the field you want to apply the filter to. 
  6. Click the Condition drop-down and choose the condition you want to use in the filter.
  7. (If necessary) Select the Value source: 
    • Manual entry: Enter the value you want to filter by in the Value field. 
    • Another dataset: Select the dataset and field you want to filter from the relevant drop-downs. 
  8. Click Add Filter
  1. Publish your site when you are ready to make the changes go live. 

Adding sort conditions to your dataset

By default, datasets sort items by creation date with the newest items appearing first in the connected page elements (e.g. repeaters, galleries, input elements). You can add sort conditions to datasets to control the order in which the items appear on your site. Dataset sorts override the order in any collections in which you've enabled the "Mirror on Site" feature. However, dataset sorts do not affect the order in which items appear in your collection views. 
Wix Editor
Editor X
Studio Editor
  1. Go to your editor.
  2. Select the relevant dataset. 
  3. Click Settings
  4. Click + Add Sort in the Sort section. 
    Tip: To edit an existing sort condition, hover over it, click the More Actions icon  and select Edit.
  5. Click the Field drop-down and select the field you want to sort. 
  6. Click the Order drop-down and choose the order in which you want the content to appear. 
  7. Click Add Sort
  1. Publish your site when you are ready to make the changes go live. 

Did this help?

|