Manifest
manifest.json
Manifest.json is where you specify some behavior of the template.
It is only required for multi items templates.
{
"editWitoutPostback": true,
"editRole": "OpenContentEditor",
"index": true, /* required for search */,
"detailMetaTitle": "{{#if Seo.MetaTitle}}{{Seo.MetaTitle}}{{else}}{{Title}}{{/if}}",
"detailMetaDescription": "{{#if Seo.MetaDescription}}{{Seo.MetaDescription}}{{else}}{{Description}}{{/if}}",
"detailUrl": "{{Category.Title}}-{{#if Seo.Slug}}{{Seo.Slug}}{{else}}{{Title}}{{/if}}",
"detailMeta": "{{#if Image}}<meta property=\"og:image\" content=\"{{Image}}\" />{{/if}}<meta property=\"og:type\" content=\"article\" />",
"templates": {
"template": {
"type": "multiple", /* single or multiple*/
"title": "List",
"clientSide": true,
"main": {
"template": "template.hbs",
"partialTemplates": {
"item": {
"template": "item.hbs"
}
},
"schemaInTemplate": true,
"optionsInTemplate": true
},
"detail": {
"template": "detail.hbs",
"partialTemplates": {
"item": {
"template": "item.hbs",
"clientside" : true
}
},
"schemaInTemplate": true,
"optionsInTemplate": true
}
},
"categories": {
"type": "multiple", /* single or multiple*/
"title": "Categories",
"main": {
"template": "categories.hbs",
"schemaInTemplate": true,
"optionsInTemplate": true,
"dataInTemplate": false,
"additionalDataInTemplate": true
}
}
},
},
"additionalData": {
"Intro": {
"title": "Introduction",
"scope": "tabmodule" /* tabmodule, module, tab, portal */
},
"Categories": {
"title": "Categories"
},
"Tags": {
"title": "Tags"
},
"Customers": {
"title": "Customers",
"dataModuleId": 123,
"dataTabId": 456
}
},
"dataSource": "TrelloOpenContentDataProvider",
"dataSourceConfig": {
"username":"JohnDoe",
"password":"Mdd*951;"
}
}
Manifest
Name | Default Value | Remark |
---|---|---|
editWitoutPostback | false | in edit mode wrap the view control in an updatepanel to avoid full page postback |
editRole | when specified, users with the editRole can add records and edit records created by them. (only applicable for multi items templates) | |
index | false | Content is indexed with Lucene for search, filtering & sorting. (new in v2.1) See also Search, Filter and Sort |
detailMetaTitle | handlebars template | |
detailMetaDescription | handlebars template | |
detailUrl | handlebars template | |
detailMeta | handlebars template | |
templates | see Template | list of templates included in the template folder |
additionalData | see additionalData | |
dataSource | OpenContentProvider | a string with the name of an OpenContent DataSourceProvider. See also External Datasources optional |
dataSourceConfig | any valid json that will be given to the datasource provider via the DataSourceContext parameters in the interface calls. See also External Datasources optional |
Template
Name | Default value | Remark |
---|---|---|
type | single or multiple | |
title | text listed in the templates dropdown lists | |
clientSideData | false | the content is served through webapi only (not available in the server side template) (new in v2.1) See also Search, Filter and Sort |
main | see Template File | list template |
detail | see Template File | detail template |
Template File
Name | Default Value | Remark |
---|---|---|
template | file name of the template file (.hbs or .cshtml) | |
partialTemplates | only for handlebars server side templates. Load additional partial template files. Also for client side templates. | |
schemaInTemplate | false | Make the schema.json available as a variable schema (Model.Schema for razor) in template files |
optionsInTemplate | false | Make the options.json available as a variable Options (Model.Options for razor) in template files |
dataInTemplate | true | Make the data available in the tamplate |
additionalDataInTemplate | false | Make the additional data available in the tamplate |
labelsInTemplate | false | Transform enum fields value to object with "value" (stored data from schema.json) and "label" (rendered value from options.json) |
dnnsearch | false | Indicating whether integrate module content in DNN search |
Partial Templates
Name | Default value | Remark |
---|---|---|
template | file name of the partial template file | |
clientSide | false | File is rendered as i at the end of the module content. For example a handlebars client side template in a script tag. (new in v2.1) |
Additional Data
Name | Default value | Remark | Example |
---|---|---|---|
title | Text shown in module actions menu | ||
scope | module | tabmodule, module, tab, portal not applicable if dataModuleId is supplied. | |
storageKey | |||
modelKey | depreciated | ||
dataModuleId dataTabId | If you want to relate to the (main) data of another module, then specify its ModuleId and TabId See also Relations | "Customers": { "title": "Customers", "dataModuleId": 123, "dataTabId": 456 } |
Updated over 7 years ago