> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/studio/template-builder/building-a-template/preview-and-save.md).

# Preview and save

Saving a template writes it to your DAM library, where it becomes an asset with versions, permissions and approvals like any other.

### Checking your design as you work

The canvas is a live render, produced by the same engine that produces the finished image, so what you see is what the template will output. There is no separate proofing step for the design itself.

Two things help while you check: the zoom control in the header, covered in [Layers](https://docs.scaleflex.com/studio/template-builder/building-a-template/layers.md#zoom-and-pan), and **Hide** on a layer's menu, which takes something out of the way for a moment. Hidden layers stay out of the rendered image too, so unhide before you save.

### Showing variable names instead of values

The last button in the canvas toolbar swaps rendered values for their variable names, so a price reads `$price$` instead of `€120`. It is the quickest way to see which parts of a design are parameterized and which are typed in.

The button is disabled until the template has at least one variable. It is also disabled while the **Edit text** window is open: apply or cancel your edit to use it again. Hover the button to see which of the two reasons applies.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FOC9rG8luiRZSoZUE8ZjM%2F20-canvas-variable-names-on.png?alt=media&amp;token=c5299bcb-c8f8-48e5-814f-95ff1d7dbea4" alt=""><figcaption></figcaption></figure>

### Checking a localized template

If your template reads localized metadata, the **Regional settings** control in the header switches the canvas between variants, so you can check that a longer translation still fits. See [Regional settings](https://docs.scaleflex.com/studio/template-builder/regional-settings.md).

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FZ96SIq23mbRc7PjBW1g7%2F24-regional-settings-dropdown.png?alt=media&amp;token=6a205803-0dc0-4fdf-88fd-a1d81d22d658" alt=""><figcaption></figcaption></figure>

### Saving

1. Click **Save** in the header.
2. Wait for the confirmation.

Each save adds a version to the same file rather than creating a new one, so earlier versions stay available in the library. The dot next to the template name shows unsaved changes. While there is nothing to save, **Save** is unavailable, though you may still be able to save a copy: see [Saving a copy of an unchanged template](https://docs.scaleflex.com/studio/template-builder/building-a-template/preview-and-save.md#saving-a-copy-of-an-unchanged-template).

Use the arrow beside **Save** for the other option:

| Action               | What it does                                                                                        |
| -------------------- | --------------------------------------------------------------------------------------------------- |
| **Save (overwrite)** | Writes a new version of the current file                                                            |
| **Save as new file** | Asks for a name and a folder, and creates a separate template there, leaving the original untouched |

**Save as new file** is also how you duplicate a template, or keep a variant of a design without disturbing the one in use.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2Fww3hkoU4lpyjdkScQQzL%2F19-save-split-button-menu.png?alt=media&amp;token=d92098c6-543c-45cd-92ec-62503976e9c6" alt=""><figcaption></figcaption></figure>

#### Choosing where the copy goes

**Save as new file** opens a window with a **File name** and, under it, the **Destination folder**. The folder starts as the one the original template is in, shown as **Root** for the top of the library.

1. Click **Change** to browse the library.
2. Pick a folder and click **Select**, or double-click the folder.
3. Click **Save**.

Some projects are set to refuse duplicate files. There the window has no folder row, and the copy is saved in the same folder as the original. Move it in the library afterwards if it belongs somewhere else.

#### Saving a copy of an unchanged template

You do not have to change a template to copy it. With nothing to save, the main button reads **Save as new**, and **Save (overwrite)** in the menu stays grayed out: writing a file with what it already contains would change nothing.

The exception is a project set to refuse duplicate files. The library would reject an identical copy, so there the button stays on a grayed-out **Save**, and both options in the menu show *No changes to save.* on hover until you make a change.

#### When overwrite is not available

Some projects are configured to refuse overwrites. In those, the main button reads **Save as new** instead of **Save**, and **Save (overwrite)** in the menu is grayed out with the reason on hover. Ask your administrator if you need overwriting enabled.

#### Saving a file that is in approval

If the template is part of an approval workflow, saving asks you to confirm first:

| State                | What saving does                                         |
| -------------------- | -------------------------------------------------------- |
| Waiting for approval | Saving lets the approvers know it changed                |
| Already approved     | Saving removes the approval, so it needs approving again |

Both prompts let you continue or go back.

### Unsaved changes

Closing the editor with unsaved changes asks you to confirm, and so does closing the browser tab.

#### Getting unsaved changes back

While a template has unsaved changes, the editor keeps a copy of them in your browser, a moment after each edit. If the tab is reloaded or crashes, or you leave without saving, the next time you open the template in the same browser it asks **Restore unsaved changes?** and says when the changes were made:

| Choice      | What it does                                                                       |
| ----------- | ---------------------------------------------------------------------------------- |
| **Restore** | Brings the changes back, still unsaved, so you can carry on and save               |
| **Discard** | Drops them and opens the template as it was last saved. They are not offered again |

This works for a template that has never been saved too.

If the template has been saved since your changes were made, the prompt warns you: restoring them replaces that save the next time you save.

A few limits to know:

* The copy is kept only in the browser you were using. Another browser or another computer does not have it, and clearing your browsing data removes it.
* It is cleared when you save, and kept for 24 hours otherwise. The browser holds copies for up to 20 templates, dropping the oldest first.
* Changes in a tab that is still open stay with that tab: opening the same template in a second tab does not offer them.

It is a safety net, not a substitute for saving.

#### When a newer version is saved

A template can be saved by you in another tab, or by a colleague, while you have it open. Your tab finds out straight away when the save comes from another tab of the same browser, and otherwise when you come back to the tab or try to save.

* **With no unsaved changes**, the editor switches to the latest version and tells you so.
* **With unsaved changes**, a banner says a newer version was saved, and **Save** can no longer overwrite the template. Choose **Save as new file** to keep your changes as a separate template, or **Discard and open latest** to drop them and continue on the latest version.

Unsaved changes made on a version that has since been replaced are never restored over the latest one. If you reopen such a template, the prompt reads **Newer version available**, with **Save as new file** to keep the changes as a separate template and **Discard** to drop them and open the latest version.

### Previewing the finished image

The **Preview** button in the header, the eye beside **Save**, renders the template as a finished image, produced by the same service that renders it wherever it is used. It shows the layout you are working on, filled with each variable's default value and the regional variant chosen in the header. If the template has more than one layout you can switch between them from inside the preview. Switching there also switches the layout you are editing, so closing the preview leaves you on the last one you looked at.

The preview renders the saved template, so **Preview** is grayed out while you have unsaved changes. Save first, and it becomes available again. A template that has never been saved has nothing to render yet.

Each card in the templates list has a **Preview** of its own, which always shows the default layout. See [Managing your templates](https://docs.scaleflex.com/studio/template-builder/managing-your-templates.md#previewing).

To try different values, create a variation instead - it shows a live preview as you type. See [Variations](https://docs.scaleflex.com/studio/template-builder/variations.md).

### Where to go next

* [Managing your templates](https://docs.scaleflex.com/studio/template-builder/managing-your-templates.md)
* [Variations](https://docs.scaleflex.com/studio/template-builder/variations.md)
* [Using a rendered template](https://docs.scaleflex.com/studio/template-builder/using-a-rendered-template.md)
