Custom Templating

​​What is custom templating:

Custom templating allows you to pass in data you’ve stored as CSV into the Studio UI. This feature enables you to design a task interface that is compatible with a data structure you’ve already established in CSV format.

Custom templating is currently compatible with the text collection task type. This feature allows you to use markdown to easily format how you would like to present your task.

Note, currently only CSV uploads can be used with our custom templating tool and the templating tool is strictly a formatter.

How to use Custom templating:

Follow the below steps:

  1. Create tasks using the "Upload Data" files upload area
  2. Navigate to the “Definition” tab
  3. Select “Data”
  4. Click “Edit Template”
  5. Open the “Custom Task Builder”
  6. Edit the template inputs in markdown. Note, markdown specifies the formatting in which you want items to be shown. Our templating tool has two types of inputs: A.) Variables: Correspond to your CSV headers. B.) Pages: For each row, every value will replace the corresponding CSV header variable in the markdown wrapped by {{ }}. Each page that you add has its own markdown editor associated with it for you to determine what appears on that page.
  7. After using this tool to set your template, you will be able to generate a sample CSV with the current headers of your template. Once you have a CSV ready with all the values you need, you will be able to create tasks after finishing up the taxonomy and project instructions sections. At this stage in project creation, you can choose to upload your CSV data before completing the other sections or you can complete the other sections first and use the "Upload and Create" batch option.

Example:

Imagine there are 3 items you want to show to labelers in a task:

  1. A youtube video
  2. A description of the video
  3. An image with the thumbnail for the idea

Assume you’d like to put the thumbnail image on page 1, and the video and description on page 2. To accomplish this, you’ll need to give each a variable name that corresponds to the CSV headers. Example:

  • A youtube video: YT_video
  • A description of the video: Description
  • An image with the thumbnail for the idea: TN_image

Next, you’ll need to complete the following steps:

  • Open the markdown editor on page 1 and specify that you want TN_image to show there
  • Open the markdown editor on page 2 and specify that you want YT_video and Description to show there
  • Since these variables are placeholders, you’ll need to upload a CSV that has links to videos, description and image URLs
  • After passing this in, our system will generate task IDs that correspond to each row
35723572

Find the custom templating tool in Definition >> Data >> Edit Template

The row responsible for generating the task in Exhibit A would look like Exhibit B. The markdown for Exhibit A can be seen in Exhibit C.

14961496

Exhibit A

15061506

Exhibit B

15001500

Exhibit C

Updated 2 months ago