Templates

A template is a single HTML document with {{variable}} tokens that SignatureCat renders per user. Templates live on the Signatures page (Designers, Editors and Admins) and are edited either in the visual editor or in a code editor, both with live preview.

Each entry in the list carries its name, icon and color, a Default marker where it applies, and Last edited by with the person who changed it last - useful when several admins share the work. Duplicate creates an independent copy of a template, so you can try a variant without touching the original.

For a guided first run, see Create your first template. The variable set has its own page: Template variables.

The editor

The editor at app.signature.cat/signatures/{id} has two tabs, and opens in the mode the template was last saved in:

  • Visual - design on a canvas without writing HTML: variable chips, image resize handles, columns, dividers, one-off images from a URL, fonts and an email-safe color palette. It has a dedicated page.
  • HTML - edit the signature markup directly, with autocompletion for all {{variable}} tokens.

Converting HTML to Visual is one-way and best-effort (complex table layouts are flattened; the editor warns first); saving from the HTML tab discards the visual document. In both modes you get:

  • Preview - live rendering of the resolved signature, in a sandbox. Render as substitutes any real user's Directory record so you can check edge cases (long names, missing phone numbers), and the preview can imitate five mail clients in light and dark; see Mail client preview.
  • Insert variable - menu of all person variables, grouped with hints.
  • Logo / Banner - the per-kind image galleries; see Banners and logos.
  • Wrap in {{del}} / Wrap in {{delete}} - wraps the current selection in conditional tags.
  • Set me a test signature - renders against your own Directory record and applies to your own Gmail mailbox only. SignatureCat then reads back what Gmail actually stored, so a signature Gmail trimmed while saving it is reported instead of looking fine; see When Gmail trims your signature.
  • Discard changes - appears whenever you have unsaved changes and restores the last saved version, after a confirmation.
  • Name and icon - a label, icon and color shown in template lists (never rendered into signatures).

Validation and sanitization

Saving validates the template and rejects:

  • unknown tokens (anything that is not a known variable, asset token or conditional tag),
  • unbalanced {{del}} / {{delete}} pairs.

Error messages are specific: an unknown token is named and unbalanced conditional tags come with their open/close counts. A live counter tracks Gmail's 10,000-character signature limit.

The HTML is sanitized on save: scripts, iframes, event handlers (onclick= and friends) and javascript: URLs are stripped. Signatures are static HTML by nature - Gmail would strip active content anyway.

Gmail sanitizes as well, on its own servers, when it stores the signature: a write can succeed and Gmail can still keep a simplified copy of a complicated layout. SignatureCat compares the two and tells you when that happened - what to do about it is in When Gmail trims your signature.

The default template

One template can be marked as Default. Users who are not covered by any assignment or self-service choice fall back to it - and so do users whose assignment was deleted.

Self-service toggle

Each template has a self-service switch controlling whether end users can pick it on the My signature page. Disabling it clears the self-service choices that use it (with a confirmation). Details: Self-service.

Deleting a template

Deleting an unused template just removes it. Deleting a template that is in use shows a cascade dialog first, spelling out exactly what goes with it:

  • its group and OU assignments,
  • self-service choices made by users,
  • queued apply jobs (cancelled).