# Collection template

<figure><img src="https://3064615700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3yE7VVjvl0MgK6awOPKB%2Fuploads%2F88o7s9AcTsFEnHyWzlLt%2FHelp%20Center%20(1).jpg?alt=media&#x26;token=0c32d43f-3970-45f4-b80c-f82da6e72439" alt=""><figcaption><p><a href="https://chromewebstore.google.com/detail/foxtransfer-html-to-shopi/babcinhpofjfhjjbcnjhoikcjbgebimb?utm_source=foxecom&#x26;utm_medium=helpcenter&#x26;utm_campaign=foxtransfer_launch">Install FoxTransfer Chrome Extension FREE here</a></p></figcaption></figure>

***

By default, you can customize using the **Default collection** template.

**Any changes you make to a template will impact all pages that use that template**. If you want to display some pages of that type differently, then you can create a new template based on one that already exists in your theme.

## Create a new collection template

1\. In the theme editor (**Customize**), use the page selector to open **Collections > Create template**.

<figure><img src="https://3064615700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3yE7VVjvl0MgK6awOPKB%2Fuploads%2FS5gIBwkIs8TcyIuFYTnU%2Fimage.png?alt=media&#x26;token=f74fb0ea-8814-4026-875c-2cb7e8802eec" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3064615700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3yE7VVjvl0MgK6awOPKB%2Fuploads%2FznyhJHUbDqDWmbO8GA25%2Fimage.png?alt=media&#x26;token=e3ea3c16-ea11-45c9-af5e-51dfcabd51da" alt=""><figcaption></figcaption></figure>

2\. Add **Name** in the provided field for the new template.

<figure><img src="https://3064615700-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3yE7VVjvl0MgK6awOPKB%2Fuploads%2FhNoLIjLKWOhs4NlrCQi1%2Fimage.png?alt=media&#x26;token=8f65cbde-c31f-407e-8764-97f1db787d7d" alt=""><figcaption></figcaption></figure>

3\. Choose the suitable value in the **Based on** dropdown, then select **Create template**.

## Apply a new template to a collection <a href="#apply-a-new-template-to-a-collection" id="apply-a-new-template-to-a-collection"></a>

1. From your Shopify admin, go to **Products > Collections**.
2. Use the search filter to locate the collection that you want to change, or click the collection from the list of existing collections.
3. In the **Online store** section, use the dropdown menu to select a new theme template to apply to the selected collection.
4. Click **Save**.

## Managing your templates <a href="#managing-your-templates" id="managing-your-templates"></a>

To rename or delete your template, you need to use the code editor. Editing your template file might cause issues to your online store.

### Rename a template <a href="#rename-a-template" id="rename-a-template"></a>

1. From your Shopify admin, go to **Online Store** > [**Themes**](https://www.shopify.com/admin/themes).
2. Find the theme with the template that you want to rename, and then click the **...** button > **Edit code**.
3. In the code editor, find the templates folder. Click the name of the template that you want to rename, and then click **Rename file**.
4. Enter the new template name, and click **Rename file** to save.

### Delete a template <a href="#delete-a-template" id="delete-a-template"></a>

1. From your Shopify admin, go to **Online Store** > [**Themes**](https://www.shopify.com/admin/themes)
2. Find the theme you want to delete a template from, and then click the **...** button > **Edit code**.
3. In the code editor, find the templates folder. Click the name of the template that you want to delete, and then click **Delete file**. If you have any resources assigned to that template, then they are displayed with the default template until you assign a different one.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.foxecom.com/sleek-theme/collections-and-products/collection-page/collection-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
