Reusable headers and footers (partials)
Use template partials to include the same header, footer, or section in multiple templates without duplication.
Template partials are small reusable HTML sections that you define once and include in multiple templates. This saves time and ensures consistency: if you need to update your company logo or address in every document, you edit the partial once instead of modifying every template.
Before you start:
- You must have permission to edit print templates.
- Understand the basic structure of your templates (header, body, footer sections).
- Know what content you want to reuse across templates (company details, logo, standard disclaimer, etc.).
How partials work:
A partial is a named HTML section stored in your template library. Instead of writing the same code in each template, you insert a reference to the partial using a Handlebars include command. When the template is printed, Usystems automatically substitutes the partial content.
Creating or registering a partial:
-
Open a template editor. Go to Settings → Print Templates Open in Usystems and select a template.
-
Look for a partials section. On the template detail page, find a section, tab, or button labeled Partials, Includes, or Shared Snippets (exact label varies by product version).
-
Create a new partial. Click Add Partial, New Partial, or similar. Name it descriptively (e.g., "company_header", "standard_footer", "confidentiality_notice").
-
Write the partial code. In the partial editor, write the HTML that you want to reuse:
<div style="border-top: 1px solid #ccc; padding-top: 10px; margin-top: 20px;"> <p style="font-size: 10pt; color: #666;"> <strong>{{business.name}}</strong><br> {{business.address}}<br> Phone: {{business.phone}} </p> </div> -
Save the partial. Click Save and note the partial name you assigned.
Using a partial in a template:
-
Open the template where you want to include the partial.
-
Add the include command. At the location in your template where you want the partial content to appear, insert the Handlebars include syntax:
{{> company_header}}or
{{#include "company_header"}}{{/include}}(The exact syntax may vary; check your product's documentation.)
-
Save the template. Click Save. The partial will now be embedded in the template.
-
Test the output. Print or preview a document to confirm the partial content renders correctly.
Common partial examples:
-
Company Header: Logo, business name, registration number, tax ID.
<header style="text-align: center; margin-bottom: 20px;"> <img src="logo.png" alt="Company Logo" style="max-width: 150px;" /> <h2>{{business.name}}</h2> <p>Registration: {{business.registration}}</p> </header> -
Standard Footer: Copyright, contact info, payment terms disclaimer.
<footer style="border-top: 1px solid #999; margin-top: 30px; padding-top: 10px; font-size: 9pt;"> <p>© {{current_year}} {{business.name}}. All rights reserved.</p> <p>{{business.address}} | Tel: {{business.phone}} | Email: {{business.email}}</p> </footer> -
Confidentiality or Legal Notice:
<div style="background-color: #f9f9f9; border-left: 4px solid #ff6600; padding: 10px; margin: 15px 0; font-size: 9pt;"> <p><strong>Confidential:</strong> This document is confidential and intended only for the named recipient.</p> </div>
Tips & common mistakes:
- Keep partials modular. Each partial should represent one logical section (header, footer, notice). Avoid creating one giant partial for the entire template.
- Use variables in partials. Partials can include Handlebars variables like
{{business.name}}just like regular templates. This makes them flexible. - Update once, deploy everywhere. If you change a partial, all templates that use it will reflect the change on the next print. No need to edit each template separately.
- Test after updating a partial. If you modify an existing partial used by multiple templates, print a sample document from each template to confirm the change looks good everywhere.
- Naming conventions: Use descriptive, lowercase names with underscores (e.g., "company_footer", "tax_disclaimer") so you can easily identify partials in your template code.
Was this helpful?