Templates
Publish a template
A template you are working on is a draft: it changes every time you edit it. Publishing picks one saved version for everything that renders the template outside the editor, such as the Salesforce PDF button on your records or Generate PDF in the Weft panel on HubSpot records. Until you publish again, those buttons keep producing exactly the published version, however much you change the draft.
That separation is the point. You can restyle a quote, rework a clause or try a new layout without the sales team's button changing under them.
Before you start
- Publishing exists only in the hosted app (signed in to a workspace). Local mode has no publish step and no Salesforce button.
- Publishing needs the editor role or higher.
- The template must have been saved at least once. On an unsaved document there is nothing to publish yet — press Save first.
Draft and published, side by side
| What you use | What it renders |
|---|---|
| Preview PDF | Your working draft, including edits you have not saved |
| Export PDF | Your working draft — it saves your changes first, then renders that save |
| The Salesforce PDF button | The published version |
| Generate PDF in the Weft panel in HubSpot | The published version |
A template that has never been published is not hidden from the buttons: until the first publish, they render the latest saved version.
Publish
- Open the Save ▾ menu — the caret beside Save, whose tooltip reads Save options.
- Choose Publish.
If you have changes that are not saved yet, publishing saves them first, so your latest edits are included, and then marks that saved version as published. With nothing changed since your last save, it publishes the version you already saved and adds no new one. Afterwards the menu item reads Published and is greyed out until there is something new to publish.
Read the publish status
The status is the small line under the menu item. Weft re-reads it each time you open the menu, so it reflects a teammate's publish too.
| Menu item | Line underneath | What it means |
|---|---|---|
| Publish | Not published — Salesforce and HubSpot buttons & API renders will show this version | Never published; the buttons render the latest saved version |
| Publish | v3 live — external renders don't show your latest edits | Version 3 is live; you have changed the template since |
| Published | Up to date — external renders show v5 | Nothing to publish; version 5 is live and matches what you have |
The version numbers are the template's own save numbers, so they climb as you save.
Publish again after changes
Edit as much as you like, saving as often as you want. Save alone never changes what is published. When the draft is ready to reach the button, open Save ▾ and choose Publish again.
There is no undo for a publish. To go back to earlier content, change the draft back and publish again.
What publishing freezes
A published version is a snapshot. Two things are fixed in it:
- The content — every block, its text and bindings, the page setup, header and footer, cover pages and the document theme, exactly as saved.
- The data source query — which connection, which object, which fields, filters, related records, order and limit. A published version keeps running the query it was published with, even after you change the data source in the draft. See Build a data source.
A version saved before the template had any data source has none of its own. For such a version the button uses the template's current data source instead — unless shared access is on, in which case the button is refused until you publish again and an admin approves that version.
What is not frozen is the data itself. Every click of the button fetches the record fresh, so the published version always shows current values.
Good to know
- Publish after changing a data source. Changing a data source marks the document Unsaved, like any other edit. Save it (⌘S, or Ctrl+S on Windows) and publish, so the button runs the new query rather than the one frozen into the last published version.
- Shared access needs a fresh approval when the query changes. If the Salesforce button uses shared access, publishing a version whose data query differs from the approved one pauses the button until an admin approves the new version. A version with the same queries — a layout change, say — stays approved. See Add a Salesforce PDF button.
- Copies start unpublished. Save as a copy…, in the same Save ▾ menu, creates a new template with its own link and no data sources of its own; existing buttons keep pointing at the original. See Manage templates.
- Deleting stops the button. A template in the recycle bin cannot be rendered from outside the editor until it is restored. See Manage templates.
- During a review of a change Buddy proposed, Publish waits until you accept or discard it.