CMS: Connecting Text Elements to the Dataset Item Count

3 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
Editor X
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, click Create a New 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.
Ready to go live?
Click Preview at the top right of your Editor to test out the connections. When everything looks great and works perfectly, click Publish to make the changes go live. 

If you've enabled Sandbox, sync your Sandbox collection to the live collection to make the database changes go live. 

Did this help?