Integrating templates with

Guide for Shopify integration

1. From your Shopify admin, go to Online Store > Themes.

2. Find the theme you want to edit, and then click Actions > Edit code.

3. In the Templates directory, click Add a new template

4. Choose a type option for your new template. For example, for an alternate product template, select product. Give your template a meaningful name, which will make it easy to find when you are assigning it in the admin. For example, an alternate product template with no prices or add to cart button might be called not-for-sale.

5. Click Create template. Your new template will open in the code editor, and the file will be populated with default code.

6. Depending on your theme and the type of template that you have created, you might need to create a new section file as well. If your new template contains the code that you want to edit, then creating a section won’t be necessary. In this case, you can simply edit your new template as needed, and move on to the next step.

If your new template includes a Liquid tag for a section that contains the code that you want to edit, then you will need to create a new section. For example, if you are creating an alternate product template, then you will need to create a new section, since most of the code that makes up the product page is stored in a section file, rather than a template file.

In your new template file, find the Liquid tag for the section that you’d like to edit, and replace the name of the section with the name that you will give your new section. For example, the product template contains the following Liquid tag:

{% section 'product-template' %} Replace product-template with the name of the new section that you will create next. For example, if you call your new section product-not-for-sale-template, then your code should look like this:
{% section 'product-not-for-sale-template' %}

7. Click Save. If you do not need to create a new section to make your edits, then you can skip the next section. Source: https://help.shopify.com/en/themes/customization/store/create-alternate-templates

 

Need more help? Check out the Shopify Cheat Sheet here.

Source: https://help.shopify.com/en/themes/customization/store/create-alternate-templates