Skip to main content
The template editor is where you change what a document looks like and what it prints. It opens in a full-screen window over the Templates page. Most templates can be edited in two ways: the Visual editor, where you build the document from blocks without writing code, and the Code editor, where you edit the template’s Liquid and HTML directly. Whatever you change, the page preview follows as you work. The template editor in Visual mode

Open the editor

  1. In Foliant, go to Templates.
  2. Open the template’s Actions menu and choose Edit template. You can also open the template’s Settings page and click Edit template there.
The editor always opens a template that already exists. To make a new one, use Create template on the Templates page first (see Create a template); the editor opens on the new template once it’s created. To close the editor, use the close button of the window in the Shopify admin. You return to the page you came from.

What you see

The top bar shows the template’s name and these actions: The row under the top bar holds:
  • The mode switch: Visual and Code. See Switch between Visual and Code.
  • The document’s Paper, Document language, Second language (code templates) and Number format. These are saved with the template. See Preview, paper size and zoom and Dates, languages and translations.
  • The Published or Draft — unpublished changes badge, when publishing is required.
  • An Unsaved changes badge while you have changes to save.
  • In the visual editor: Undo, Redo, Document styles and the block count.
The main area depends on the mode:
  • Visual: the block palette on the left, the page in the middle, and the inspector on the right. See Add, move and remove blocks.
  • Code: the code editor on the left, with the Liquid variables and Metafields references, and the live preview on the right. See Edit a template’s code.
Above the page you’ll also find Preview PDF, the Watermark: on / Watermark: off button (see Add a watermark or stamp), the preview order picker and the zoom buttons.

Which editor a template opens in

  • A template built from blocks opens in Visual when your plan includes the visual editor. Otherwise it opens in Code. See Visual editor plan availability.
  • A template written in code opens in Code. You can convert it to blocks with the Visual tab.
  • A template made from a purchased design opens in the design editor instead. See Customize a design.

Good to know

  • Links that leave the editor (such as Template settings, branding settings or the Plans page) close the window. If you have unsaved changes, Foliant first asks you to Save and continue or Discard and continue.
  • On invoice and credit note templates that have already issued documents, a banner reminds you that changes apply only to documents issued from now on. See Lock issued invoices.
  • Templates that print one document for all the selected orders (manifests, order summaries, pick lists) offer their own blocks and fields. The preview uses three sample orders for them, and blocks can’t have conditions.