Adding a dataset
Once you’ve added a collection and created your design with corresponding elements, you can add a dataset. Select the element you want to connect to your collection—a Repeater for example–and click the Connect to Data icon.
In the panel that opens, choose Create Dataset and select the collection you want to connect to. You can also name the dataset. When that’s done, click Create. The dataset will appear as an icon on the canvas with the name you assigned it.
Connect elements to your collection
Select your desired elements and connect them to the corresponding field in your collection. You can only connect elements to their corresponding field type: images to an image field, text to a text field, etc.
If you’re connecting a Repeater, select the Repeater and connect each component from the panel. You only need to do this once, and all of the other Repeater items will update to display the content from your collection.
Setting the dataset mode settings
Click on the dataset and choose Settings. In the setting panel, you can choose from 3 modes: Read-only, Write-only and Read & Write. The dataset mode determines how visitors can interact with the collection on your live site.
Read-only: Elements can read and display content from your collection, so site visitors can view it.
Write-only: Visitors can interact with user input elements and a submit button on your live site to add content to your collections. You can’t display collection content.
Read & Write: Page elements can display content from the collection and visitors can interact with user input elements and a submit button on your live site to add or edit content in a collection.
Setting the number of items to display
Control how many items from the collection are displayed in a Repeater or gallery by entering the value under Number of items to display.
Filtering content
Create filters to display content based on a set of conditions that you apply. Select the dataset icon and open the settings panel. Click Add Filter. From the Field dropdown, choose which field from your collection you want to use to filter your content. Use the Condition dropdown to choose which criteria to filter by. For the Value source choose between:
Manual entry: filter by a specific value or text you enter
Another dataset: filter this dataset based on another one
User input element: let site visitors filter page content by selecting an option from an input element such as a dropdown
Sorting content
Set up content to display in the order you want by adding sort criteria. Open the Dataset Settings panel, and under Sort choose Add Sort. Choose which field to sort by and under the Order dropdown select how you want the field to be sorted.
Editing sort and filter settings
You can adjust or remove filters and sorting properties from the Dataset Settings panel. Find the property you set, click on the 3 dots next to it and choose to either Edit or Delete it.
Was this lesson helpful?
Thank you for your feedback!