Data Collections are a lightweight way to manage structured content, built into Replo. If you've ever used a Content Management System (CMS) like Contentful, Strapi, or Sanity before, you'll be familiar with Data Collections.
You can thing 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:
- Add a component that accepts Data Collection rows as inputs to your page (usually a Carousel or Tabs)
- Click the component's Config tab and change the Dynamic Values dropdown to Data Collection and click the Select Data Collection button.
- From here either create a new or select an existing Data Collection.
- 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:
- Give your collection a name. You can also specify specific names for singular and plural names of the collection.
- Click "Add a Field" to add your first field that every row in the collection will have.
- 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).
- Click the "Add" button in the lower right to add the field
- Click the "Save" button in the lower right to save the Data Collection.
To add a row to a Data Collection:
- Select an existing Data Collection, or create a new one.
- Click the "New" button in the upper right to create a new row.
- In the row, use the built-in controls to edit the content of each cell of the row.