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 *
| Property | Type | Default | Description |
|---|---|---|---|
| name | string | Name of the template. | |
| application | string | Path (file name) to main application for this template. | |
| type | string | Describes what type of template/application this is. Valid types are: template, worker, trigger, adconnect, data The default (if not specified) is template. | |
| icon | string | 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. | |
| thumbnail | string | 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. | |
| version | string | Version number of the template | |
| contentBasePath | string | Base directory for media. | |
| options | object | Defined below. | |
| customEditor * | string | Path to custom editor. | |
| fields | array | Defined below. |
Options
| Option | Type | Default | Description |
|---|---|---|---|
| apiVersion * | number | 2 | CMS API version number. |
| templateVersion * | number | 3 | Template API version number. |
| defaultDuration * | number | 10 | Default duration when creating content. |
| targetWidth | number | Content width in pixels. | |
| targetHeight | number | Content height in pixels. | |
| allowReuse * | boolean | false | If template accepts multiple preload/shift. |
| scalePreview * | boolean | true | If CMS is allowed to scale preview. |
| scalePlayer * | boolean | true | If playback is allowed to scale content. |
| enableAltMedia * | boolean | true | If 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:
The following editable field types are supported:
| Field type | Description |
|---|---|
| text | Single-line text. |
| textarea | Multi-line text. |
| checkbox | Boolean checkbox. |
| content | Choose or upload single file. |
| select | Select from list. |
| section | Grouping of fields. |