Manifest: Template.json
- 15 Oct 2024
- 1 読む分
- 印刷する
Manifest: Template.json
- 更新日 15 Oct 2024
- 1 読む分
- 印刷する
The content is currently unavailable in Ja - 日本語. You are viewing the default English version.
記事の要約
この要約は役に立ちましたか?
ご意見ありがとうございます
The manifest file provides vital information about the template to the system:
{
"name": "My First Template",
"contentBasePath": "",
"application": "template.html",
"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",
"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 to main application for this 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. |
select | Selection of single option from list. |
content | Choose or upload single file. |
contentlist | Choose or upload multiple files. |
number | Numeric. |
range | Numeric range slider. |
date | Choose date using calendar widget. |
color | Choose RGB color using palette widget. |
section | A special field that groups fields graphically in the CMS editor. Each section contains children with arbitrary fields as above. Sections can also include sections. Sections do not have a key. |
Each field type is described in detail in the next section
この記事は役に立ちましたか?