Data Collections

  • Updated

Data Collections are a lightweight way to manage structured content, built into Replo. If you've ever used a Content Management System (CMS) like ContentfulStrapi, or Sanity before, you'll be familiar with Data Collections.

You can think of Data Collections as a kind of spreadsheet - every item in the collection is a row, and each column has a type. Replo lets you create and edit these collections without needing a third-party CMS.

Types of Data Collection Fields

There are many different types of fields that can be added to a Data Collection:

  • Shopify Product: each cell will be a product which is pulled automatically from your Shopify Store.
  • Text: each cell will be fully editable rich text content.
  • Color: each cell will be a specific color
  • Image: each cell will be an image, either from your Shopify Store or from a url
  • Image List: each cell will be a list of images (for example, to use in a carousel)

Using a Data Collection

To create and/or configure a data collection, you'll need to use one of the components that shows one piece of data out of a collection of many rows. Carousels and Tabs are both great examples.

To create or use an existing Data Collection:

  1. Add a component that accepts Data Collection rows as inputs to your page (usually a Carousel or Tabs)
  2. Click the component's Config tab and change the Dynamic Values dropdown to Data Collection and click the Select Data Collection button.
  3. From here either create a new or select an existing Data Collection.
  4. All components inside the Component's Panels now have access to the Data Collection row as part of Dynamic Data

When creating a new Data Collection:

  1. Give your collection a name. You can also specify specific names for singular and plural names of the collection.
  2. Click "Add a Field" to add your first field that every row in the collection will have.
  3. Add a name for the field, and select the type of the field (for example, if each row should have a product, select Shopify Product here from the dropdown).
  4. Click the "Add" button in the lower right to add the field
  5. Click the "Save" button in the lower right to save the Data Collection.

To add a row to a Data Collection:

  1. Select an existing Data Collection, or create a new one.
  2. Click the "New" button in the upper right to create a new row.
  3. In the row, use the built-in controls to edit the content of each cell of the row.
Data Collections are scoped to the project level. Updating a Data Collection on one page will update it across all pages where it's being used.

Was this article helpful?