Within the tile for Templates, you can create templates in HTML-format.
Templates are HTML templates that allow you to create and consistently use patterns.
To create a new template, click on the plus icon in the template overview. Select the folder name and enter a template name, optionally a description. Now enter the HTML template content. On the right side, you see a preview of the template. Once you have created the template content, click Save.
In the Template Editor, you have several options in the toolbar:
- Undo
- Redo
- Search
- Search and Replace
- Settings
- Fullscreen
In addition, it is possible to parameterize templates. To do this, switch to the tab ‘Parameters’. Via the plus icon, you can add a new input parameter.
Our template feature for placeholders is based on the library Handlebars which is similar to Mustache but not the same. Basic placeholders are set via {{paramName}}. See Handlebar documentation to learn more about all the expressions that can be used.
There are some restrictions within Simplifier, which are documented on GitHub. E.g.:
- Paths with special characters. Example: {{foo-bar}}
- Literal Paths. Example: {{[foo bar]}}, {{[foo bar]/expression}}, {{[@alan]/expression}}
- Hashes using single quotes. Example: {{foo cruel=’CRUEL’}}
- Parameters as strings. Example: {{wycats is.a slave.driver}} – The first parameter to the wycats helper will result in the empty string, not “is.a”