manifest.json
Manifest is a file that describe your template and all parameters that final user can personalize.
{
"version": 1,
"name": "Template Name",
"categories": ["collect", "increase", "guide", "connect"],
"type": "popup",
"origin": "URL address of origin template, if this was cloned",
"description": {
"pl": "Polish description",
"en": "English description"
},
"width": 1200,
"height": 630,
"responsive": false,
"form": {
"fields": {
"name": "string",
"email": "string"
},
"options": {
"closeOnSubmit": false
}
},
"params-sections": {
"general": {
"title": {
"pl": "Ustawienia",
"en": "Settings"
},
"description": {
"pl": "Główne ustawienia overlaya",
"en": "Main overlay settings"
}
}
},
"params": {
"header": {
"type": "text",
"section": "general",
"label": "Headline", // without localization
"required": false,
"default": {
"pl": "Cześć <b>Świecie</b>",
"en": "Hello <b>World</b>"
},
"html-friendly": true
},
"headerFontSize": {
"type": "number",
"section": "general",
"label": {
"pl": "Rozmiar czcionki nagłówka",
"en": "Header font size"
},
"required": false,
"default": 24,
"min": 12,
"max": 36
},
"bgcolor": {
"type": "color",
"section": "general",
"label": {
"pl": "Kolor tła",
"en": "Background color"
},
"required": false,
"default": {
"pl": "#ffffff",
"en": "#ffffff"
}
}
}
}name- internal name of the template, not visible in UIcategories- category of the template, can be one or few, available categories:- For Overlays and Topbars:
collect- for collecting e-mail addressincrease- for increasing salesguide- for guiding visitorsconnect- connecting with visitors
- For Mails:
rescue- mail for abandon cart recoverypromo- promotion & offersadministrate- wiadomość administracyjnaspecial- wiadomość specjalna
- For Overlays and Topbars:
type- template type, one ofpopup(aka Overlay),topbar,mailorigin- url of origin template, if you copy and change other template (optional)description- description of the template (localized), will be visible in UIwidth- optimal width of a template in pixelsheight- optimal height of a template in pixelsresponsive- is this template responsive (default:true)countdown- template use countdown feature (default:false)- set to
trueif template use countdown
- set to
Trust Bar only manifest fields:
mobile-height- topbar height on mobile devicesmobile-breakpoint- max width in pixel at witchmobile-heightwill be applied at
Form form
If template has a form that can be submitted you need to declare it in manifest in form node (look at example on the right). Inside this node there are two objects fields and options
In fields you declare names (name=) of the form fields alongside type which can be one of the following:
stringnumberdatebool
In options whish is optional, you can include following parameters:
closeOnSubmit-true/false
Parameter Sections params-sections
Parameter section groups parameters to single logic set. Parameter sections are stored in params-sections object, where keys are a sections individual IDs.
Single params-sections has following properties:
title- name of the section, visible in template editor (localized)description- description of the section visible in template editor (localized)showWhen- you can display section in Template Editor based on other parameters value. SeeshowWhenin Parameters section below.
Parameters params
Parameters makes template dynamic and personal. When final user choose your template he can change any of them. So make sure you add plenty of them to allow personalize your template.
You can group parameters into parameters sections. Parameters are stored in params object, where keys are parameter names.
Single param has following properties:
type- type of parameter (see below)section- parameter section IDlabel- name of the parameter (localized)required- parameter is required or no?true/falsedefault- default value of parameter (localized)html-friendly- set totrueif parameter can receive HTML code (see below)showWhen- a way to show/hide parameter in Template Editor (see below)
Parameter property type:
"buttonHeight": {
"type": "number",
"min": 10,
"max": 50,
"section": "general",
"label": {
"pl": "Wysokość przycisku",
"en": "Button height"
},
"required": false
},
"buttonAnimation": {
"type": "select",
"section": "general",
"label": {
"pl": "Animacja przycisku",
"en": "Button animation"
},
"required": false,
"selectOptions": [
{
"value": "appear",
"labels": {
"pl": "Pojawienie się",
"en": "Button appear"
}
},
{
"value": "slide-in-left",
"labels": {
"pl": "Wjazd od lewej",
"en": "Slide-in from left"
}
}
]
}text: ex. “sample text”textStyle: styling text: font, size, bold, italic etc.number: ex. 1, you can add also specify:min: min value of input (optional)max: max value of input (optional)
color: ex. “#000000”bool: ex. true / falsedate: date & timedateOptionsdate optionsrelative: can date be relative ex. 10 minutesabsolute: can date be absolute ex. 08-08-2021 12:00:00
image: URL to imageproduct: product objectproductArray: product array, you can also specify:min: min amount of products (optional)max: max amount of products (optional)
review: review objectreviewArray: review arrays, you can also specifymin: min amount of reviews (optional)max: max amount of reviews (optional)
cta: allow user to choose action from- redirect to specific address
- copy text to clipboard
- open other Trust Overlay, Bar etc.
select: allow user to select value from the listselectOptionsarray of options (see example on the right)
array: array of any object (this property is not supported in UI Designer)
Parameter property html-friendly:
Sometimes we need to allow final user to insert raw HTML code inside our template. To make this work, mark parameter as HTML friendly with this attribute. This will give user hint in template editor.
To make this full work you need to also put data-html-friendly="true" attribute in parent tag, see below.
Parameter property showWhen:
"buttonColor": {
"type": "color",
"section": "general",
"label": {
"pl": "Kolor przycisku",
"en": "Button color"
},
"required": false,
"showWhen": {
"otherParameterName": "isButtonVisible",
"comparisonType": "equals",
"otherParameterValue": "true"
}
}You can display certain parameters in Template Editor based on other parameters value. This is helpful if you have some conditions like “show/hide button” and then you can specify “buttonColor”.
comparisonType: includes|equals|greaterOrEqual|lessOrEqual