# Using templates

Your online store consists of different types of **pages**, including: the *home page*, *product pages*, *collection pages*, *blogs*, and other *pages*.

Pages are designed using **templates**. In the theme editor, you change the look and layout of your pages by editing their assigned templates.

* There are **default templates** for each type of page. *Editing a default template will apply the same layout to all pages that use that template*.
* To **use different layouts for specific pages**, create new templates, then assign those templates to your pages in the Shopify admin.

## Open templates

***

Use the **Templates selector** in the theme editor to find the templates available for each page type. By default, the theme editor opens the *Home page* template.

See the[ Theme templates guide](https://help.fluorescent.co/cornerstone/pages/templates) for a full overview of all available templates.

{% content-ref url="../../pages/templates" %}
[templates](https://help.fluorescent.co/cornerstone/pages/templates)
{% endcontent-ref %}

## Preview changes

***

When you open a template, the theme editor selects a page (e.g. one product or collection) to preview the changes made to that template.

* Click **Change** in the "PREVIEW" section to view a different page with that template.
* To view a full preview of the live site, click more **`…`** > **Preview**. The preview will open in a new window, and you can click **Share preview** to copy the preview link to share with others.

## Assign templates to pages

***

If a warning symbol **(!)** appears next to the page name, this means that the template you are editing is not applied to that page. Go to the page in the Shopify admin and use the **Theme template** menu to assign a template.

{% hint style="warning" %}
By default, templates from trial or unpublished themes will not show in the page's template menu. As a workaround, learn how to [assign templates from an unpublished theme](#assign-templates-from-unpublished-theme).
{% endhint %}

## Create and assign multiple templates

***

At first, there is one **Default template** for every type of page. This means that **changes made to a default template will apply to all pages that use that template**.

To change the content or style of specific pages, you will need to **create a new template** and then **assign that template** to those pages in the Shopify Admin.

> Alternatively, you can use [Metafields and dynamic sources](https://help.fluorescent.co/cornerstone/general/adapting-your-theme/dynamic-content-with-metafields) to automatically display the correct content or settings for pages that use the same template.

<details>

<summary><mark style="color:blue;"><strong>STEPS</strong></mark></summary>

In your theme editor (**Customize**):

1. Use the **Templates selector** to open the **Products**, **Collections**, **Pages**, **Blogs**, or **Blog posts** templates.
2. Click **Create template**.

   ![](https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2FTyC7BzqlPIqxC030emEO%2Fcollections-create-template.jpeg?alt=media\&token=6b249d32-dc18-454c-8de7-67ba54e6cb94)
3. Enter a **Name** for your new template and click **Create template**.

   > The new template will duplicate the settings of the original template.

   ![](https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2F1M2wmGEctccwCweL2ZJL%2Fcreate-template.jpeg?alt=media\&token=372e3e4d-64c9-4d99-9bb0-1cbcb4a71212)
4. Under **Preview**, click **Change** to preview different pages with this template.

   > If a warning icon **(!)** appears, you need to assign the template in your Shopify admin.

   ![](https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2FXtr67sNRntB3PY5Ptl42%2Feditor-preview-change.jpeg?alt=media\&token=bffef678-d687-4b2c-beff-ddea9283be59)
5. To assign a template, go to the page in the Shopify admin and use the **Theme template** menu to select a specific template.

   > Templates cannot be assigned on **unpublished** or **trial** themes. All changes to your templates will be saved but can only be assigned when purchased and published.
6. Click **Save**.

</details>

## Assign templates from unpublished theme

***

Shopify only allows you to assign templates from your published theme. Shopify will not show templates from unpublished themes, unless they have the same name as the published theme’s templates.

As a workaround, you can **create a duplicate template in the published theme and give it the same name as the template from the unpublished theme**.

This new template will show in the Shopify admin and assigning it will apply the template to both themes.

<details>

<summary><mark style="color:blue;"><strong>STEPS</strong></mark></summary>

1. Open the theme editor for your published theme (**Customize**).
2. Use the template selector to find your currently assigned template.
3. Click **(+) Create template**.

   <figure><img src="https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2FMQKQuyGqeyyajMFCKkiY%2Ftemplate-unpublished-create.png?alt=media&#x26;token=fe5376a3-c1be-41d4-87d6-d34b90a39a80" alt="" width="367"><figcaption><p>Template selector in published theme</p></figcaption></figure>
4. Enter the exact same **Name** as the template in your unpublished theme.

   <div align="left"><figure><img src="https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2FIaYoj05SmutnIN31R8gM%2Ftemplate-unpublished-name.png?alt=media&#x26;token=8c8e6b77-df02-4fea-9a9d-d7bfcb5b11ff" alt="" width="342"><figcaption><p>New template name that matches the unpublished theme</p></figcaption></figure> <figure><img src="https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2F8lTNJ6DoPQfSBehErBI4%2Ftemplate-unpublished.png?alt=media&#x26;token=73c29b27-b565-4381-8f21-a95df99fc3e1" alt="" width="241"><figcaption><p>Template in the unpublished theme</p></figcaption></figure></div>
5. Select the current template that the new template should be **based on**.

   > This will duplicate everything in the current template and will ensure nothing changes in your current theme when you assign the new template.
6. Click **Create template**.

**In your Shopify admin**:

1. Go to the page you want to assign the template to.
2. Click the template dropdown and select your template.

   > For products and collections, you can [use the bulk editor to assign templates](https://help.shopify.com/en/manual/online-store/themes/theme-structure/templates#bulk-template-changes) to more than one at a time.

   <figure><img src="https://475958657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fyt3Wwaqhge0XvrXmVj7D%2Fuploads%2FPdhTJZiBPGbeYCfShD9l%2Ftemplate-unpublished-assign.png?alt=media&#x26;token=c2955cf2-3c51-49ba-b2da-74ca3dbd7e66" alt=""><figcaption></figcaption></figure>
3. Click **Save**

</details>

***

> **Related links**
>
> [Theme templates](https://help.fluorescent.co/cornerstone/pages/templates)
