Version history
Every time you save a template, Foliant keeps a version of it. If a change breaks a document, or you want to see what changed and when, open the template’s history to view, compare or restore any version.Open the history
- Open the template in the editor.
- Click History. With Require publishing on and a draft waiting, History is next to Publish.
- To go back, click Back to editor.
What each version shows
Versions are listed newest first, as Version 1, Version 2 and so on. Each one shows:- When it was saved, and how: Created, Code editor, Visual editor, Design editor, Restored, Starter template, Imported, Foliant or Shared section.
- Who saved it, when known, for example Staff or System. Design editor saves are marked Autosaved.
- Badges: Published (the live version), Draft (an unpublished draft) and Used by issued invoices (a version that issued, locked documents were made with).
- “Restored from version 3” when the version was made by restoring another one.
View a version
Click View on a version to see it on the right. Foliant compares it with the published version (or, for the published version, with the draft or the version before it).Compare two versions
- Click Compare on the first version. It’s marked Selected.
- Click Compare on a second version.
- The comparison opens as Version 3 → version 5, with two tabs:
- Code: the changes in the template’s source.
- Preview: both versions rendered side by side.
Restore a version
- Click Restore on the version you want back. It isn’t shown on the version that’s already live.
- Confirm with Restore:
- With Require publishing off, restoring creates a new version from the old one and publishes it.
- With Require publishing on, restoring creates a new draft. Publish it to make it live. See Work on drafts with Require publishing.
What’s kept, and for how long
- A version records the template’s content: its code or blocks, watermark and paper size, and for a design template, the design’s settings and wording. Settings such as the name, pre-selection and document type aren’t versioned: they apply straight away.
- Published, draft and Used by issued invoices versions are always kept, and so are versions that were restored from.
- Quick bursts of design editor autosaves are combined after a day.
- Each template keeps its newest 100 versions. Older versions beyond those are removed once they’re more than a year old.
Good to know
- A version made with a different design can’t be restored onto a template made from a design.
- Documents that were issued and locked keep the version they were made with. See Lock issued invoices.