Skip to main content
A visual template’s layout is stored as data: its blocks and its document styles. You can export that data to a .json file and import it into another template, in the same store or in another store that uses Foliant. This is handy for agencies and for stores with more than one Shopify shop.

Before you start

Export and import are part of the visual editor and only work for visual templates. See Visual editor plan availability.

Export a template’s blocks

  1. Open the visual template in the editor.
  2. In the top bar, click View blocks as JSON. The Editor state (JSON) view shows the blocks and document styles as data.
  3. Click Export.
Your browser downloads a file named after the template, ending in .foliant.json (for example packing-slip-eu.foliant.json). It holds the template’s name, its document type, and its blocks and document styles.

Import blocks into a template

  1. Open the template you want to change (a visual template), then click View blocks as JSON.
  2. Click Import.
  3. Choose a Template export (.json) file, or paste its text under Or paste the JSON.
  4. Click Import.
The imported blocks and styles replace this template’s blocks and document styles, and the editor returns to the visual view. Nothing is saved until you save, and Undo brings yours back. To start from scratch with an imported layout, create a new template first (see Create a template), convert it to visual, then import.

If the import fails

Good to know

  • The export includes the blocks and document styles only. The template’s settings (who gets it, its language, paper size, watermark and deliveries) aren’t part of it.
  • Click Back to visual to leave the JSON view.
  • The JSON view is read-only: change the template in the visual editor or the code editor.