Skip to main content

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

  1. Open the template in the editor.
  2. Click History. With Require publishing on and a draft waiting, History is next to Publish.
  3. 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.
Click Load more at the bottom to see older versions.

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

  1. Click Compare on the first version. It’s marked Selected.
  2. Click Compare on a second version.
  3. 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.
If other content settings changed too, a line says so, for example “Also changed: paper size A4 → Letter, watermark”.

Restore a version

  1. Click Restore on the version you want back. It isn’t shown on the version that’s already live.
  2. 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.
Restoring never deletes versions: it adds a new one at the top. If you have unsaved changes in the editor, they’re lost when you restore.

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.