Skip to main content
Changes you make in the template editor aren’t kept until you save them. While you have unsaved changes, the editor shows an Unsaved changes badge and the Shopify admin shows its save bar with Save and Discard. If your store requires publishing, saving creates a draft that you publish when it’s ready.

Save or discard your changes

  • Click Save in the save bar. Printed documents, exports and PDF delivery use the saved template from then on (or, with Require publishing on, once you publish).
  • Click Discard to go back to the last saved version.
A save can be refused. The editor shows why:

Leaving with unsaved changes

  • If you click a link that leaves the editor, such as Template settings, the branding settings or the Plans page, Foliant asks Save your changes first? Choose Save and continue or Discard and continue. If the save fails, you stay in the editor and see why.
  • If you close the editor window with unsaved changes, the Shopify admin asks you to save or discard them first.

Publish a draft

When Require publishing is on in Settings › Documents & printing › Template publishing, saved changes to a template’s code, watermark or paper size stay a draft. Customers, exports and prints keep using the published version until you publish. In the editor:
  • The badge reads Published, or Draft — unpublished changes when there’s a draft. The editor always opens on the draft.
  • Click Publish in the top bar to make the draft live. Save your changes first: “Save your changes before publishing.”
  • Click Discard draft to go back to the published version. The draft stays in the version history.
See Work on drafts with Require publishing for how publishing works across your templates.

Version history

Every save keeps a version. Click History in the top bar to open the Version history. For each version you can:
  • View it.
  • Compare it with another version: the code side by side, the two previews, and other changes such as the paper size or watermark.
  • Restore it. With Require publishing on, restoring creates a new draft from that version for you to publish; otherwise it creates a new version and publishes it. Your unsaved changes in the editor are lost.
Versions show where they came from, for example Code editor, Visual editor, Restored or Shared section. Click Back to editor to return.

Good to know

  • Invoices and credit notes that were already issued keep their original layout. Your changes apply to documents issued from now on. See Lock issued invoices.
  • Changing a shared section updates every template using it straight away, without a separate save or publish. See Saved blocks and shared sections.
  • The editor’s paper, document language and number format are saved with the template, like its code.