How to Make Custom Collection Template in Shopify Dawn Theme

Step 1: Duplicate the Existing Collection Template

  1. Log in to your Shopify admin panel.
  2. Navigate to Online Store > Themes.
  3. Find the Dawn theme, click on Actions, then Edit code.

Step 2: Create a New Template

  1. In the Templates directory, find the collection.json file.
  2. Click on collection.json to open it.
  3. Create a copy of this file with a new name. For example, collection.custom.json.

Step 3: Edit the New Template

  1. Open collection.custom.json.
  2. Modify the sections and blocks as needed to customize the collection template. For example, if you want to add a new section or modify the layout, you can do so here.

Here is an example of a custom collection template (collection.custom.json):

Step 4: Add a Custom Section

  1. In the Sections directory, create a new file named custom-section.liquid.
  2. Add the HTML, CSS, and Liquid code to define your custom section. Here is an example:
  1. In the schema section of your custom-section.liquid file, define the settings for your custom section:

Step 5: Assign the Custom Template to a Collection

  1. Go back to your Shopify admin panel.
  2. Navigate to Products > Collections.
  3. Select the collection you want to use the custom template.
  4. In the Theme template section, select your new custom template (e.g., collection.custom).
  5. Save the collection.

Step 6: Customize Further as Needed

You can continue to customize your collection.custom.json template and custom-section.liquid section to add more features or modify the layout according to your requirements.

Summary

By following these steps, you have created a custom collection template in the Shopify Dawn theme:

  1. Duplicated the existing collection template to create a new template.
  2. Modified the new template to include custom sections and settings.
  3. Created and customized a new section to include in your custom template.
  4. Assigned the custom template to a specific collection in your Shopify admin.

This approach allows you to have a unique layout and functionality for specific collections in your Shopify store.

Leave a Reply

Your email address will not be published. Required fields are marked *