Connect Repeater Item
4 min read
After connecting your repeater to the CMS, set the connection options for each element in the repeater's container. Click Repeater connections to go back to viewing all the connection options for all the elements in the repeater.
How do I connect this repeater to a CMS collection?
Start by creating a new dataset or connecting an existing one. Choose which collection to connect your dataset to, then choose which collection fields you want to link to each repeater element.
- Create a new dataset or connect an existing one:
- Create a new dataset:
- Click Create Dataset. If you already have a dataset on your page, click the Connect a dataset drop-down and select Add a New Dataset.
- Click the Choose a collection drop-down and select the relevant collection.
- (Optional) Click the Dataset name field and enter a name for the dataset.
- Click Create.
- Connect an existing dataset:
- Click the Connect a dataset drop-down.
- Select the dataset you want to connect.
- Create a new dataset:
- Under Connections, click the element you want to connect to your CMS collection (e.g. Image, Text, Background).
- Click the relevant drop-down(s) under Connections and choose which collection field(s) you want to connect to the element.
- Click Repeater connections and repeat steps 2-3 for each element you want to connect.
- Publish your site to make the changes go live.
Learn more about connecting dynamic page elements to datasets.
How can I let site visitors filter content that appears in this repeater?
Use input elements to allow site visitors to filter your repeater content. Add the input elements to the page and connect them to the same dataset as your repeater.
Make sure to also:
- Set the dataset to the Read or Read & Write mode.
- Set the collection permissions to allow everyone to view content.
View a step-by-step tutorial for allowing visitors to filter content with input elements.
How do I link a repeater item to a dynamic item page?
You can set up your repeater so that clicking an image or button takes you to the item's dynamic item page. Make sure your repeater already has an image or button attached to it. Then follow the steps below to link the element to your dynamic item page.
- Click to create a new dataset and connect it to a collection, or select an existing dataset from the Connect a dataset drop-down.
- Under Connections, click the relevant Image or Button element and connect it to your dynamic item page:
Tip: Dynamic item pages are listed with the name of the collection (e.g. "Projects"), followed by "(Item)".- Image: Click the Link connect to drop-down and select the relevant dynamic item page under Dynamic Pages.
- Button: Click the Click action connects to drop-down and select the relevant dynamic item page under Dynamic Pages.
- Choose how the page opens under How does it open?.
- (Optional) Click the relevant drop-down menus under Connections to connect more collection fields to the element.
Learn more about:
What is a dataset?
Datasets are the vital link between the elements on your page and the content in your CMS collection. You can use datasets to create a two-way connection, allowing you to display collection content, capture user inputs, or both.
Datasets allow you to control which parts of your page elements connect to which fields in your collection. Each dataset connects to a collection and each element connected to the dataset connects to a field in the collection. This unlocks a new way of managing which content appears and where.
Learn more about adding and setting up a dataset.
How do I add sorts, filters, and more options to my dataset?
You can modify your dataset from the dataset settings:
- In your Editor, select the relevant dataset and click Settings.
Note: In Wix Studio, go to the Inspector panel to select the dataset. Then click the More Actions icon next to the relevant dataset and select Dataset settings. - Click the Choose a collection drop-down and select the collection you want to connect.
- Click the Dataset name field to change the dataset name.
- Click the Dataset mode drop-down to change the dataset mode.
- Edit the Number of items to display field to set the maximum items that can load at a time. This is also the maximum items that load when visitors click "Load More" buttons on repeaters and galleries or "Next/Previous Page" buttons on dynamic item pages.
- Click + Add Filter to show or hide specific content from your collection.
- Click + Add Sort to choose the order in which collection items display.
Learn more about:
How do I create 'Load More' or navigational buttons?
You can display up to 1000 items at a time in a repeater on a dynamic list page. However, if you want to display a lot of items, consider adding a 'Load More' button to improve loading performance. Adjust the 'Maximum items displayed' field to control the number of items that can load at a time in the dataset's connected repeater.
The 'Maximum items displayed' field also determines the number of items displayed per 'page' in the repeater or gallery on your dynamic list page if you connect 'Next/Previous page' buttons or a pagination bar (Wix Editor only).
Learn how to create 'Load More' and navigational buttons.
Did this help?
|