Manifest: Template.json

Prev Next

The manifest file provides vital information about the template to the system:

{
    "name": "My First Template",
    "contentBasePath": "",
    "application": "template.html",
    "type": "template",
    "icon": "",
    "thumbnail": "",
    "version": "1.0",
    "options": {
        "apiVersion": 2,
        "templateVersion": 3,
        "defaultDuration": 10,
        "targetWidth": 1920,
        "targetHeight": 1080,
        "scalePreview": true,
        "scalePlayer": true,
        "allowReuse": false,
        "enableAltMedia": false
    },
    "fields": [
        {
            "type": "text",
            "key": "heading",
            "caption": "Enter your headline",
            "default": "",
            "required": true
        },
        {
            "type": "textarea",
            "key": "body",
            "caption": "Enter your text",
            "default": "",
            "required": false
        },
        {
            "key": "media",
            "caption": "Choose a Picture or Video",
            "type": "content",
            "required": false,
            "mediaType": "video/mp4, video/webm, image/jpg, image/jpeg, image/png, image/webp",
            "options": [
                {
                    "path": "/Media"
                },
                {
                    "path": "/"
                }
            ]
        }
    ]
}

Properties

Below is a description of each field.  Optional fields are marked with a *

PropertyTypeDefaultDescription
namestring
Name of the template.
applicationstring
Path (file name) to main application for this template.
typestring
Describes what type of template/application this is. Valid types are:
template, worker, trigger, adconnect, data
The default (if not specified) is template.
iconstring
Path (file name) of an image file in the ZIP. If specified, the CMS will use this as the icon in the list of Templates, instead of generating a live thumbnail.
thumbnailstring
Path (file name) of an image file in the ZIP. If specified, the CMS will use this as the thumbnail for all messages created with the template, instead of generating live thumbnails.
versionstring
Version number of the template
contentBasePathstring
Base directory for media.
optionsobject
Defined below.
customEditor *string
Path to custom editor.
fieldsarray
Defined below.

Options

OptionTypeDefault Description
apiVersion *number2CMS API version number.
templateVersion *number3Template API version number.
defaultDuration *number10Default duration when creating content.
targetWidthnumber
Content width in pixels.
targetHeightnumber
Content height in pixels.
allowReuse *booleanfalseIf template accepts multiple preload/shift.
scalePreview *booleantrueIf CMS is allowed to scale preview.
scalePlayer *booleantrueIf playback is allowed to scale content.
enableAltMedia *booleantrueIf converted/transcoded version of media should be used.
templateMetadata *any
Optional metadata to the template.

Fields

This array contains the definition of all fields the template uses. Each element in the array should be a json object with the following properties, optional fields are marked with a *:

Field propertyDescription
typeThe type of the field.
keyUnique identifier of the field, used as the name of the field if caption isn't defined.
caption*Name of the field shown in the Portal.
default*The default value of the field.
required*If the field is a required or optional field.
mediaType*Defines the media type of the field to define file type filtering in the Portal. See supported media types.
options*Field type specific options.
children*Fields inside a section.

The following editable field types are supported:

Field typeDescription
textSingle-line text.
textareaMulti-line text.
checkboxBoolean checkbox.
contentChoose or upload single file.
selectSelect from list.
sectionGrouping of fields.