Admin Manager – HTML Templates
HTML Templates is where you manage the HTML templates, embedded fragments, and images used by Trade Control to generate documents and emails.
This module is intended for Administrators.
What this module manages
Use HTML Templates to:
- Assign templates to a template type (for example, Invoices or Orders).
- Manage embedded
.tpl fragments used by templates.
- Manage template images (linked resources), such as a logo.
- Parse templates to validate that generated output will render correctly before use.
Access
Open:
- Admin > Manager
- Expand Templates
- Select the template type you want to configure (for example, Invoice Templates).
On desktop, the module opens in the right-hand pane. On mobile, it opens as a full page.
System templates (Support Requests and User Registration)
Some system-generated emails are assigned under System Templates.
This page is where the application assigns templates for:
- Support request emails (raising support tickets)
- User registration/verification emails (new user registration notifications)
The workflow is the same pattern for any template type in Admin Manager:
- Select the template type (for example Invoice Templates).
- Select the subtype (for invoices, the invoice type dropdown).
- Assign one or more HTML templates.
- Assign images (if the HTML references
cid:[TAG] images).
- Parse templates to validate they will render correctly.
Assign an HTML template (invoice example)
- Select the invoice type from the dropdown at the top of the page.
- Under Assign a new template, select a template file.
- Select Assign.
Expected outcome:
- The template appears under Assigned templates for that invoice type.
Validate templates (Parse)
Parsing identifies issues that would prevent output rendering correctly.
In Assigned templates:
- Select Parse for a single template, or
- Select Parse all to validate every assigned template for the selected subtype (invoice type).
Parsing checks:
- Invalid field tags (unknown
[Tag] tokens)
- Missing embedded template directives (for example
[Embed:Details=...], [Embed:Tax=...])
- Missing embedded
.tpl files
- Invalid embedded
.tpl structure (required markers/placeholders)
- Missing required output tags required by the renderer
- Image usage vs assignment
- Assigned images missing their files
Expected outcome:
- Errors and warnings are shown in the parse report panel.
- The parse status is persisted and used by Admin Manager to indicate template health.
Embedded templates (.tpl) and required structure
HTML templates can reference embedded fragments using directives such as:
[Embed:Details=invoice_template_std_details]
[Embed:Tax=invoice_template_std_tax]
These directives map to .tpl files in the templates folder.
Embedded .tpl fragments must contain:
<!--ITEM--> and <!--/ITEM--> markers (the repeating row template).
[Items] (where the rendered repeating rows are inserted).
If [Items] is missing, the embedded fragment exists but will not render repeating content.
Template images (LOGO and other linked resources)
If the HTML template references an inline image, for example:
<img src="cid:[LOGO]" alt="logo">
Then LOGO must be assigned to an image file for that specific template.
- In Assigned templates, select the template name to open Template Images.
- Under Assign a new image, choose an image file and select Assign.
- If needed, edit the tag so it matches the tag referenced in the HTML (for example
LOGO).
Expected outcome:
- The image appears under Assigned images for that template.
- When output is generated, the image is embedded and renders in the document/email body.
Navigation notes
- The Template Images page includes a Back button that returns to the correct parent configuration page.
- When working embedded inside Admin Manager, updates trigger refresh events so the left-hand tree stays in sync.
Common errors
Unknown field tag
Cause:
- The template contains a token that the renderer does not support.
Fix:
- Remove the token or replace it with a supported field tag.
Missing embedded template directive
Cause:
- A required embed directive is missing from the HTML template.
Fix:
- Add the required embed directives for that template type.
Embedded template invalid (missing [Items])
Cause:
- The embedded
.tpl file is missing the [Items] placeholder.
Fix:
- Add
[Items] outside the <!--ITEM--> ... <!--/ITEM--> block.
Image tag not assigned to template
Cause:
- The template references
cid:[TAG] but no image with tag TAG is assigned.
Fix:
- Assign an image to the template and ensure the tag matches (case-insensitive).