CMS: Adding and Setting Up a Single Item Collection
3 min read
A single item collection contains one block of content made up of standard fields that you add to. The content you add to these fields can appear on one or more static pages of your website. To display the content, you connect elements on your page to the fields in your collection.
This type of collection does not have a table layout in the CMS. It is best suited for non-repeatable content, such as an about page or a single element, like a picture or a text box.
Step 1 | Create a single item collection
When you create a collection, you either select a collection with a single item or a collection with multiple items.
To create a single item collection:
- Go to CMS in your site's dashboard.
- Click Create Collection.
- Enter a name for your collection.
- Click the drop-down and select A single item.
- Click Create.
- Click + Add Field to start adding fields to your collection.
- Define the following parameters:
- Field type: Select the type of content you want to add.
- Field name: Type a name for this field.
- Field Key: This is used in your code and can’t be changed later.
- (Optional) Type some information in to the Help text (optional) field. This text appears in the collection only. It won’t show up anywhere on your site.
- Click Save.
- Continue to add as many fields as you need for this collection.
Step 2 | Connect elements to your single item collection
Connect (or data bind) page elements to the fields in your single item collection by using a dataset. This is the same method you use to connect to a collection with multiple items.
To connect elements to your single item collection:
- Add a dataset to your page.
- Select the dataset and click Settings.
- Click the Connect a collection drop-down and select your single item collection.
- Click the page element you want to connect.
- Click the Connect To Data icon .
- Click the Connect a dataset drop-down and select the relevant dataset.
- Click the Connection Options drop-down and select the required field(s).