1. Adding dynamic content to a component

Set a repeater for an array

You can set up a repeater when the data you map to an element contains an array with multiple objects. For example, there can be many different items for sale, each with a list of reviews from different people.

Mapping array values without setting up a repeating for the data collection only takes the values from the first object in the array. Using a repeater automatically clones the mapped element for each object in the array, using the corresponding object's values for each nested mapped attribute.

To set up repeating content:

  1. Add an element to the component, or select an existing element.

  2. Click the element you want to map with dynamic data.

  3. In the right-hand pane, in the Data scope section, click Data collection.

  4. In the Data collection dialog, click Mapped.

  5. In the Source step, click the relevant data source from the drop-down list.

  6. In the Path step, the data tree displays applicable properties that you can use as a value. Click on the folder that contains the data that you want to use to replace the attribute.

  7. In the step Items, you can limit or specify the items to be used:

    • Click All to display a repeat for all items in the data source collection.

    • Click Limit to limit the repeats to the first items in the collection.

    • Click Specify to specify which items in the collection to repeat, based on their position in the list.

  8. Click Complete.

When the repeater is set up, you can see as many iterations of the repeated element in the component as you configured, each showing the object provided by the data source.

If you have suggestions for improving this article, let us know!