Show Dynamic Content in Your Repeater
5 min read
Connect this repeater to the CMS (Content Management System) to show dynamic content. With the CMS, you manage content separately in collections and connect the collection fields to elements in your repeater. Your repeater keeps a consistent design throughout, while each item in the repeater shows content from your collection about the specific item.
Before you begin:
If you haven't already, add the CMS to your site to start using dynamic content.
How do I connect this repeater to a CMS collection?
Start by adding the CMS to your site if you haven't already. Then create the collection where you will store all the content you want to use in the repeater.
Once you're ready to connect your collection to the repeater, create a dataset or connect an existing one. Choose which collection to connect your dataset to, then choose which collection fields you want to link to each repeater element.
- (If this is your 1st time using the CMS) Add the CMS to your site.
- Create a collection that includes the content you want to display.
- Select the repeater in your editor and click the Connect to CMS icon .
- Connect the repeater to a dataset that binds to your collection content:
- (If you don't have a dataset on the page) Click + Add a Dataset on the right. Then click the Choose a collection drop-down and select the relevant collection. Give the dataset a name and click Create.
- (If you already have a dataset on the page) Click the Choose a dataset drop-down and select the relevant dataset. Alternatively, select Add a Dataset to connect a new dataset to the collection where you will store the submissions, give the dataset a name and click Create.
- 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 Create 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 Connection Options and choose which collection field(s) you want to connect to the element.
- Click All 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 elements to datasets.
What's a collection?
CMS collections are databases where you store content such as text, images, and videos for use on dynamic pages and elements.
To create a collection:
- Click CMS in the side or top panel.
- Click Create Collection.
- Enter a name for your collection.
- Select an option to choose how many items you want in the collection:
- Multiple items (Default): Manage multiple pages or lists of items with the same layout like projects or services. You can add many items and store massive amounts of content in this collection type that is suited for dynamic pages and elements.
- A single item: Manage content for static pages and sections like a homepage or a promotional banner. This type of collection is best suited for static pages because it has just one item you can add fields to. Learn more about creating single item collections.
- Click Create.
- Add your items and fields to the collection manually or import a CSV file.
Next, learn how to:
- Set your collection's permissions and privacy to control the type of content you store and who can view and edit it.
- Sort and filter your view in the collection and save it as a custom view for future use.
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 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 Elements, 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 Connection Options to connect more collection fields to the element.
Learn more about:
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 visitors to view content.
View a step-by-step tutorial for allowing visitors to filter content with input elements.
For more information, see CMS: Displaying Content in a Repeater.
Did this help?
|