Templates
Creating a template
The steps in this group use the Trustisto CLI. Install it and log in first.
Shell
trustisto template new ./my-popup --type popuptemplate new creates the folder and fills it with the base package for the type. --type takes:
| Type | In the panel |
|---|---|
popup |
Overlay |
topbar |
Bar |
mail |
The command asks which categories the template belongs to. Pass them with --categories to skip the question, comma separated:
Shell
trustisto template new ./my-mail --type mail --categories increase,connect| Category | Meaning |
|---|---|
collect |
Collect contacts |
increase |
Increase sales |
guide |
Guide visitors |
connect |
Connect with clients |
The folder must not exist or must be empty, so template new never overwrites your work.
What is inside
Text
my-popup/
├── assets/
├── index.html
├── manifest.json
├── package.json
└── thumbnail.pngindex.htmlis the template itself. See index.html for parameters, loops, CTAs and forms.manifest.jsondescribes the template to the panel: name, type, categories and the parameters the user can personalize. See manifest.json.thumbnail.pngis the picture shown in the template picker. See thumbnail.png. A mail template does not need one.assets/holds images, styles and scripts. Link them with relative paths, for exampleassets/logo.png.package.jsonhas npm scripts for the commands below, sonpm run start,npm run validateandnpm run deploywork inside the folder. It is not uploaded.
template new sets type and categories in manifest.json. Change the name there before you deploy: it is the name shown in the panel.
The base packages are public, in the trustisto-template repository, one folder per type.