Link Fields

Link fields are used to contain references to:

  • Binary objects such as images, video and audio files and so on.

  • Storyline objects.

The following element defines a link field in an image content type:

<field name="binary" type="link">
  <relation>com.escenic.edit-media</relation>
  <constraints>
    <mime-type>image/jpeg</mime-type>
    <mime-type>image/png</mime-type>
  </constraints>
</field>

Note the following points:

  • The child relation element defines the relationship between the field and the objects it used to reference. In this case, the value com.escenic.edit-media indicates that the field is to be used to reference binary media objects.

  • The child constraints element lists the types of media objects the field is allowed to reference (in this case, JPEG and PNG image files)

This is a storyline link field definition:

<field name="storyline" type="link">
  <relation>com.escenic.storyline</relation>
  <constraints>
    <mime-type>application/vnd.escenic.storyline+json</mime-type>
  </constraints>
</field>

In this case the child relation element contains the value com.escenic.storyline, indicating that the field is to reference a storyline object, and the constraints element specifies a corresponding MIME type used to identify CUE storylines.