CMS: Connecting Text Elements to the Dataset Item Count

2 min read
Connect text elements to the dataset item count to display the total number of items in the collection. If you filter out items in the dataset settings, these items don't count towards the total. For example, if your collection has 10 items and the dataset filter excludes 2 items, the dataset item count is 8 since 10-2=8. 

The same concept applies if you have input elements that allow site visitors to filter the content they see. When visitors use the filters to exclude items, the item count changes to reflect the new total items retrieved by the dataset. 

To connect a text element to the dataset item count:

Wix Editor
Studio Editor
  1. Go to your editor and click the text element you want to connect. 
  2. Click the Connect to CMS icon .
  3. Click the Choose a dataset drop-down and select an existing dataset that connects to your collection. Alternatively, select Add a Dataset, then choose the collection you want to connect, give the dataset a name and click Create
  4. Click the Text connects to drop-down and select Item Count under Dataset Info
A screenshot of selecting the Item Count when connecting a text element to a dataset.
  1. Click Preview at the top right to test your item count display.
  2. Click Publish if you are ready to make the changes go live. 

Did this help?

|