Template Editor
The Template Editor is a powerful WYSIWYG editor for designing PDF documents. Insert dynamic fields, format text, add tables, and manage draft/publish versions.
Editor Layout
The editor interface has three main areas:
| Area | Purpose |
|---|---|
| Header Bar | Template info, status toggle, save and publish buttons |
| Editor Canvas | Rich text editing area with toolbar |
| Fields Sidebar | Insert dynamic fields and payment data |
Editor Toolbar
The toolbar provides comprehensive formatting options:
Text Formatting
- Font Family — Select from available fonts
- Font Size — Adjust text size
- Bold, Italic, Underline — Basic text styling
- Text Color — Change text color
- Highlight — Add background color to text
Paragraph Formatting
- Headings — H1 through H6 heading levels
- Alignment — Left, center, right, justify
- Lists — Bullet and numbered lists
- Indentation — Increase/decrease indent
Content Elements
- Tables — Insert and format tables
- Images — Upload and embed images
- Links — Add hyperlinks
- Task Lists — Checkbox lists
Inserting Dynamic Fields
Dynamic fields pull data from permits, applications, or entities when the PDF is generated.
Using the Fields Sidebar
Drag and Drop
You can also drag fields from the sidebar directly into the editor.
Field Syntax
Fields use double curly brace syntax:
{{ field_name }}
When the PDF is generated, this placeholder is replaced with actual data.
Field Groups
Fields are organized by section based on your entity configuration:
- Basic Information — Name, address, dates
- Contact Details — Phone, email, applicant info
- Custom Sections — Your configured entity sections
- Associated Records — Related entity fields
Association Fields
For related records (like property or applicant associations):
{{ association.field_name }}Payment Fields
The Payment tab in the sidebar provides payment-specific fields and tables.
Payment Fields
Insert individual payment values:
| Field | Description |
|---|---|
| Total Amount | Sum of all fees |
| Amount Paid | Total payments received |
| Balance Due | Remaining amount owed |
| Payment Date | Date of last payment |
| Payment Method | How payment was made |
Payment Table
Insert a complete payment details table:
Available columns:
| Column | Description |
|---|---|
| Date | Payment date |
| Amount | Payment amount |
| Status | Payment status |
| Payment Method | How payment was made |
| Transaction ID | Payment transaction reference |
| Reference Number | Internal reference |
| Account Code | Accounting code |
| Currency | Payment currency |
Draft and Publish Workflow
Templates support version control with drafts and published versions.
Understanding Versions
| State | Description |
|---|---|
| Draft | Working version, not used for PDF generation |
| Published | Active version used when generating PDFs |
Saving Drafts
Changes are saved as drafts:
Auto-Save
The editor periodically auto-saves your draft. The save button shows "Saved" when there are no unsaved changes.
Publishing Changes
When your template is ready:
Draft Status Bar
When a draft differs from the published version, a status bar appears:
- Discard — Revert to the published version
- Publish — Make the draft the new published version
Discarding Changes
Discarding a draft permanently removes all unpublished changes. This cannot be undone.
Template Status
Toggle whether a template is actively used:
Active vs Inactive
| Status | Effect |
|---|---|
| Active | Template can be used for PDF generation |
| Inactive | Template is disabled, won't generate PDFs |
Toggling Status
Use the switch in the header bar:
Publish Required
A template must have at least one published version before it can be activated.
Template Configuration
Click Configure to edit template metadata:
- Template Name — Update the display name
- Description — Modify the description
- Department Type — Change the owning department
- Template Type — Update the category
Entity Lock
The associated entity cannot be changed after creation. If you need a different entity, create a new template.
Headers and Footers
Templates inherit headers and footers from their department:
- Header — Appears at the top of every page
- Footer — Appears at the bottom of every page
To customize headers/footers, edit the department settings. See Settings.
Tips and Best Practices
Field Insertion
- Preview fields — Hover over a field to see its placeholder syntax
- Search fields — Use the search box to find fields quickly
- Test data — Preview your template with sample data before publishing
Layout Design
- Use tables for structured data like fee breakdowns
- Consistent spacing — Use line breaks and margins consistently
- Clear hierarchy — Use headings to organize sections
Version Management
- Save frequently — Don't lose work; save drafts often
- Test before publish — Preview with various data scenarios
- Keep templates active — Only activate tested templates
Troubleshooting
Fields Not Populating
- Verify the field exists on the entity
- Check field name spelling in the placeholder
- Ensure the record has data for that field
Formatting Issues
- Clear formatting and reapply if styles look wrong
- Check for nested tables causing layout problems
- Remove and re-add images if they don't display
Publishing Errors
- Ensure all required fields are filled
- Check for invalid HTML in the editor
- Try saving as draft first, then publishing