Template add-ons
A template add-on is an installable package of Custom Templates work: outlet snippets, custom profile fields, and CSS. It is pure data, never code, so any board can install one with a single click and uninstall it just as cleanly.
What a package contains
- Snippets: up to 20 outlet snippets, each targeting one of the documented Custom Templates outlets. Every snippet is validated against the real template engine and sanitized on install.
- Profile fields: up to 12 custom profile fields, provisioned automatically when the add-on is installed. If a board already has a field with the same handle, the existing field is respected and left untouched.
- CSS: one optional stylesheet block, injected into the board's head between markers so it is removed cleanly on uninstall.
A package must contain at least one of the three.
The manifest format
A template add-on is a single JSON file:
{
"name": "Character Sheets",
"snippets": [
{
"outlet": "post-rail:after-meta",
"name": "Character sheet",
"template": "{{#if user.custom_fields}}...{{/if}}"
}
],
"fields": [
{
"handle": "character_name",
"label": "Character name",
"type": "single_line_text_field",
"show_in_mini_profile": true,
"show_in_profile": true,
"is_link": false
}
],
"css": ".charsheet { font-size: 0.8rem; }"
}
Field type is single_line_text_field or multi_line_text_field. Templates use the exact dialect and variables documented on the Custom Templates page; unknown outlets, syntax errors, and oversized templates are rejected at upload.
<div> rows, not <tr> rows), and inline styles are limited to a whitelist of properties.Authoring: export from your board
You rarely write the manifest by hand. Build your snippets and fields on your own board with the Custom Templates editor, then choose Export as add-on on the Custom Templates page: pick what to include, add optional CSS, and download the manifest. The file you get is the package. Snippets and fields that came from someone else's installed add-on are excluded from export.
What installing does
- Snippets are created enabled, at the end of each outlet's order. Admins can toggle and reorder them, but not edit them; a Duplicate as my own action copies a snippet into an editable one.
- Fields are provisioned with your labels and visibility flags. Members fill them in like any profile field.
- Updating replaces the add-on's snippets and CSS and updates its own fields, never a field the admin created.
- Disabling switches the snippets off; uninstalling removes snippets and CSS, and keeps members' field answers unless the admin chooses to purge them.
Publishing
Upload the manifest as your app's package on the developer dashboard with the Template add-on type and submit it for review, exactly like a theme or widget. Approved add-ons appear in every board's extension directory. Test drafts on your developer board first with sideloading.