Campaign Template
A campaign template contains HTML and plain-text content, typically a banner or a promotional block, that is automatically appended to email signatures. Campaigns are managed independently of individual signature templates. Multiple campaigns can be active simultaneously.
Campaigns are linked to placeholders on the signature template via the CampaignFields document function. When a campaign is active, its content in the email's format is injected into the matching placeholder in the signature.
Activating a Campaign
A campaign is activated via a publication period set directly on the campaign template in the template editor: a start date, an end date, or both. The campaign is considered active within this period; without any dates set, it is active permanently. In addition, the campaign template must be published and cover the email's document language. If multiple campaigns are active at the same time, the publication priority decides which one is selected.
Creating a Template
- In primedocs Desktop, click «New Template» and select «Campaign» (Microsoft Outlook category).
- In the template editor, click «Editor».
- Select the document language from the drop-down menu.
- Create the campaign content in the «Visual Editor» tab.
- Save and test the template.
Visual Editor
Campaigns are designed in the visual editor: no HTML knowledge required. The HTML markup is generated and saved in the background; HTML or script code is never visible.
- Format text: Font, font size, font and highlight colour, bold, italic, underline, strikethrough, alignment, and indentation.
- Insert image: Insert an image file via the toolbar (PNG, JPEG, GIF, BMP, TIFF).
- Insert link: Select text and assign a URL via the toolbar (or
Ctrl+K).
On save, inserted images are automatically stored as picture fields (CampaignPicture_…) in the template's field configuration and referenced in the HTML only via a placeholder ({{FieldName}}). Identical images are stored only once; images removed from the content are automatically removed from the field configuration on save.
Large images
For large images already stored as image fields, the visual editor uses a reduced display copy up to 1200 pixels wide when needed. The original image field content remains unchanged; on saving, the display copy is mapped back to its original field.
Inserting an image file follows a different rule: files larger than 1 MiB (1,048,576 bytes) are reduced to a maximum width of 1200 pixels after an informational message. Smaller dimensions are not scaled up. The reduced version is inserted; the source file on disk remains unchanged.
«Text» and «HTML» Tabs
In addition to the visual editor, two further tabs are available:
- Text: Plain-text variant of the campaign for emails in plain-text format. Use «Extract text from HTML» to derive it from the HTML content.
- HTML: Direct access to the generated HTML, with a live preview and selectable preview profile. For technically experienced layouters, e.g. for complex layouts the visual editor does not cover.
Campaign content is inserted in the format of the email: HTML uses the content of the HTML tab, plain text the content of the Text tab. If no email format is supplied, it is derived from the available content. HTML content only selects HTML, plain-text content only selects plain text, and both or neither select HTML. If the Text tab is empty, the plain text is derived from the HTML content during generation; a dedicated text content is worthwhile where that derivation does not produce a usable result.
If a campaign contains both HTML and plain-text content, Test document (Ctrl+T) always uses its HTML content, including when testing a plain-text signature. The campaign is then absent from the plain-text test document, even though a plain-text version exists. Check the plain-text result by inserting the signature into a plain-text email using the add-in.
For a campaign to appear in a signature, the signature template must have the CampaignFields document function configured with the appropriate tag filter. The tag filter narrows down which campaigns may be inserted into a specific signature placeholder: only campaign templates whose tags match the filter are eligible for that placeholder. Without a tag filter, all active campaigns are eligible. Whether a campaign is inserted on its own or only on deliberate selection is controlled there by the AutoInsert attribute.