Template editor

Headers, footers and page numbers

Choose Off, Inherit or Customize for each page’s Header and Footer, preserve custom content, and add automatic page numbers.

5 min read6 sections
On this page

A document title at the top, contact details at the bottom, or a “1 / 3” page label can all live in Header and Footer. Write the content once, and Tembuilder repeats it on the PDF sheets where that part is enabled.

Global provides the shared Header and Footer. Each page independently chooses Off, Inherit, or Customize for each part. Customized content belongs to that page and repeats on its physical PDF sheets.

Expand Global in Structure, then select Add global element → Header or Footer. If it already exists, select it directly in the list to edit it.

The toggle beside each Global item controls visibility for pages using Inherit. Turning it off preserves the shared content. Pages using Customize keep their own Header or Footer enabled.

Adding a new Header or Footer is available in the base variant. Switch back to the base if you are editing another variant and do not see Add global element.

STRUCTURE
⌄ Global 1/2
▤ Footer
+ Add global element
▤ Header
Header / Footer
Tembuilder INVOICE
INVOICETB-2026-0042
Structure → Global → Add global element → Header or Footer

2. Edit the repeated content

Select Header or Footer to open its HTML, CSS, Props, and Config tabs.

With an existing template, start in Props to update a company name, website, or label used by that template. For example, the invoice template has a footerWebsite prop for the website shown at the bottom of the page.

Use HTML to change content or structure, and CSS to change its presentation. In Header/Footer HTML, {{ props.propName }} reads a prop belonging to that part; {{ global.props.propName }} reads a prop from Global.

Global → Footer → Props
HTMLCSSPropsConfig
FOOTER
footerWebsiteText
VALUEtembuilder.com{{ props.footerWebsite }}
Global → Footer → Props → footerWebsite

Open Header → Config → Margin or Footer → Config → Margin. Enable margins and enter the four sides in mm. The Background section below sets the background of that Header or Footer.

These margins are separate from Content margin. To align a header logo with a table in the body, set the Header’s Left/Right margins to match the content area’s Left/Right margins.

Header/Footer height follows its content, including its own margins. Content margin → Top/Bottom provides the gap between that area and the main content. To increase the gap after a Header, change Content margin Top; to inset a logo inside the Header, change the Header’s margins or CSS.

Global → Header → Config
PropsConfig
Margin · mm
Top4
Left14
Right14
Bottom4
HeaderMargin
Content margin · Top
Section content
Header/Footer margins and Content margin are separate settings

4. Choose a mode for each page

Select a page in Structure → Config → Layout. Header and Footer each have their own mode.

Mode On the page In Structure
Off Hides this part. Hides its page item.
Inherit Uses the current Global version and follows its visibility. Hides its page item.
Customize Uses this page’s saved copy, including when the Global part is off. Shows its page item.

For a cover, choose Off for Header and Footer. Choose Inherit on pages that should follow the shared design. Use Customize when a page needs its own repeated content or configuration.

Structure → Page → Config
Layout
Header
OffInheritCustomize
Footer
OffInheritCustomize
Each page chooses its Header and Footer mode

5. Insert automatic page numbers

Add this to Footer or Header HTML:

<span>{{ global.props.page_number }} / {{ global.props.total_pages }}</span>

These values are built into Global Props and filled by the system when the document is generated:

Value Content
global.props.page_number The current PDF sheet number.
global.props.total_pages The total PDF sheet count.

You do not need to create another prop to store page numbers. For a three-sheet document, this example displays 1 / 3, 2 / 3, and 3 / 3.

Global → Footer → HTML
HTMLCSSPropsConfig
{{ global.props.page_number }} /
{{ global.props.total_pages }}
Tembuilder INVOICE
INVOICETB-2026-0042
Tembuilder INVOICE
INVOICETB-2026-0042
Tembuilder INVOICE
INVOICETB-2026-0042
System values show the current PDF sheet and total sheet count

The first switch to Customize copies the effective Global HTML, CSS, props and configuration, including margins, mirroring and background. If no Global content exists, you start with an empty editable copy.

Expand the page in Structure. Its customized items appear before the content sections, ordered Header → Footer → sections. Select an item to edit its own HTML, CSS, Props or Config tab. Changes to this copy belong to the page. Later Global changes apply to pages using Inherit.

Switching to Off or Inherit keeps the customized copy and hides its item. Returning to Customize restores your edits, including after saving and reopening the template.

Each customized Header or Footer repeats across all PDF sheets produced by its logical page. In a variant, use the page’s Follow Base / Customize control to choose whether that variant owns the configuration. This is separate from the Header/Footer mode. Editing a page-owned copy in another variant creates an independent copy for that variant.

Search documentation