Populate a repeater.
In this example, we demonstrate how to populate a repeater using different data sources across 3 site pages:
This example illustrates practical applications of repeaters in different scenarios.
We added the following to our site:
The Static Data, Collection Data, and External Data pages all contain the same repeater element. The repeater items contain text elements to display a greeting, the language of the greeting, and the index of the item.
Greetings: A collection containing a greeting and the language of that greeting.
The code in all 3 files sets the repeater data from different sources and defines how the repeater items are displayed by setting the text for the language, greeting, and index fields.
In this file, we:
In this file, we:
In this file, we:
The code in this file retrieves greeting information from an external source with the following method:
Join the Wix Studio community on Discord, where experienced developers and fellow creators come together to share tips, troubleshoot issues, and collaborate.
Building a coded solution on your own can be challenging. Let an experienced Wix developer build it for you, so you can keep working on your site or business. Visit the Wix Marketplace to find a trusted developer.