Creating a Collection Gallery Activity
Overview
Within our Getting Started Package, you will find a Template folder. We have provided a template for the configuration file, which is used by the CLIO interface to set up the activity. We also include a content drafting template created in Microsoft Word that can aid collaboration when creating activities as part of a development team.
Options
Object
The collection can have an unlimited number of objects.
Property | Description | Expected Parameters | Examples |
---|---|---|---|
Title | Name of the object that you are displaying. | Plain Text | |
Subtitle | Additional signifying information about the object, such as the department or collection it’s from. | Plain Text | |
Description | Textual information about the object that is shown beside it’s preview image. | Rich Text |
Object Images
An object can have an unlimited number of images.
Property | Description | Expected Parameters | Examples |
---|---|---|---|
Image | Image file to be displayed. | Image File | |
Caption | Description about the image that is displayed alongside the image. | Plain Text |
Creating the Activity
Define the Activity
All CLIO activities, regardless of their Activity Type, contain many of the same configuration settings. These are used to configure the screen and load the correct content. By defining this information, we can begin to draft more specific activity content. This information is included in both the drafting template and the coding template provided with each activity type.
Drafting the Content
Open the provided Content Template for drafting the Collections Objects activity. First, we must decide on the basic descriptive information for the activity, such as the title, description, preview image and theme. This information is required because it is used by the CLIO interface to properly display the activity.
Next, we can start to write the content needed for the Collections Objects activity type. This activity type is used to display a list of objects from the museum’s collections, such as a fossil specimen, an archaeological artifact or life sciences sample. Each object can contain a full gallery of images, each with a descriptive caption.
If we are making a Collections Objects activity with three objects, we would create a duplicate of the Collections Object Content template. Once we open this file, the first thing we would do is select and copy all of the text related to Object 1, as displayed in the template.
After the text has been copied, paste it to the end of the document and rename it to Object 3. Now that we have templates for three objects, we can begin to draft the content about each object. Each object requires a title, a subtitle (such as department or collection name), the preview image of the object, and a description about it.
Each object can also have as many images related to it as you would like. If you have four images you would like to have related to this object, duplicate the template text until there are four images for you to fill out. For each image, you can provide a link to the desired file, as well as a description of the image.
Coding the Activity
The next step will be to take the content that was created in the Content template and begin to migrate it into the Configuration template. We will need to open the provided Configuration Template for drafting the Collections Objects activity. This can be done in a plain text editor, but for the purpose of this manual we will be using jsoneditoronline.org/.
This is how the configuration file will appear once opened within JSONEditorOnline. Our first step will be duplicating the necessary fields to ensure that we can enter all of the data that we’ve spent time drafting. In our previous example, we decided to use three Objects within our activity, so we should start by making sure we have three Objects within the configuration file.
Within this configuration file, the first object within the activity is labeled as ‘1’, underneath the Content object. If we click on the small box to the left of ‘1’, we can choose to duplicate it as many times as we need to create enough specimen objects.
We have three objects we would like to add to the activity, so we will need to duplicate this field twice. After this is done, we will need to rename the fields we just duplicated. Currently, they will be named “1 (copy)” and “1 (copy 2)”. It is important that these keys be numeric and unique. We will rename them “2” and “3”, respectively.
Now, we start to copy over the information we drafted earlier and provide more information to the interface about these objects we’ve created. Using JSONEditorOnline, we can simply click on the values to edit them. Copying text from your drafting template, you can paste it into the title, subtitle and description fields.
Once we’ve provided descriptive information about the object, we can define the images we want to show in that object’s gallery. Similar to the way we needed to duplicate our object to make two more, we need to duplicate our image field to add additional images to the gallery.
We have decided that we want the gallery associated with this object to have three images. This means we will need to duplicate the image field twice in total. Just like before, we will also need to rename these from “1 (copy) “ and “1 (copy 2)”, into “2” and “3” respectively.
Now that we have added enough images to our object, we can continue to copy over the information we wrote in the drafting template. Remember that the location of each image, which is stored in “Image”, is relative to the @Media folder of the Program containing this activity. This means that the location should always start with a /, such as “/relative/location/to/image.jpg”. It should be noted that fields will require proper character escaping. When using JSONEditorOnline, this is handled automatically.
Repeat this process for all of the desired objects and images. Once you are finished, you can download the finished JSON file by clicking ‘Save’ and then ‘Save to Disk’. This file can be copied to the Program’s @Activity folder, and the media can be copied to the Program’s @Media directory.