Venue - Pages - Create additional page templates

Vintage themes

Note: The work in the following article is considered a technical task. If you don't wish to do this yourself you could consider speaking to Enhancify who carry out a variety of tasks on fixed price basis. Shopify also have their own Small Tasks service. For larger tasks or ongoing design work it would be a good idea to form a relationship with one of the Shopify Experts https://experts.shopify.com/

Safe As Milk themes ship with built-in page templates. These template enable you to create content rich pages for your store. Once you have created and assigned page templates you can then add custom content using the theme editor. Please see the article linked at the bottom of this page for more on assigning templates.

Our themes typically come with 3 x blank page templates built in. If you find that this is insufficient for your needs you can create new blank templates.

Warning: Before beginning we recommend you duplicate your existing theme as a safety precaution. Follow step 1-3 below but select Duplicate instead of Edit code at Step 3.

A. Create a new sections file

1
Log in your Shopify store admin
2
Click on  Online Store then  Themes in the side menu to get to the themes area of your admin.
3

    On the theme click on the button with the three dots and select the Edit code option.

4
Once the code editor is open look at the different theme files in the left hand column until you get to the Sections folder, and click the folder icon to open it. Once the folder is open click  Add new section.
5
Next you have to name your new section. In this example we are trying to create a template for a store's team page. So we will call our new section 'page-sections-team'. Make sure there is no space between any words. Only use hyphens or underlines between words. Make sure you are using a unique file name. Click  Create section when ready.

6
Now you will have a new file called 'page-sections-team.liquid' which you need to edit. 
7
Next delete all of the code in your new file but DO NOT save yet.

8
Look in the left hand column of files again and click on file 'page-sections.liquid'. (In later versions of the theme you may have three or more similarly named files such as 'page-sections-1.liquid' 'page-sections-2.liquid' or 'page-sections-3.liquid'. You can select any of these.)
Copy everything that's in this file and paste it into your new empty  'page-sections-team.liquid' file.  
  

Important: Please make sure to copy NOT cut or delete the code in the original 'page-sections.liquid' file - you need to leave this file intact.

Your newly created sections file should should look like this: 

9
Now click  Save, which will be on the top right of your screen.

B. Create a new page template

1
While you are still in the code editor screen, scroll through the left hand column of theme files until you see the Templates folder. If the folder is collapsed click the folder icon to open the tree of files. Once the folder is open click Add new template.
2

Next you have to choose what type of template you are creating and name your new template. In this example we are trying to create a template for a store's team page. So we will select  Page from the dropdown and as 'Template type' choose liquid. Call your new template 'sections-team'. Make sure there is no space between any words. Only use hyphens or underlines between words. Make sure you are using a unique file name. Click Create template when ready.

Pro tip: You do not have to match the name of the page template to the name of the sections file you created earlier but it's probably best to for the sake of consistency. 

3
After you have created the new template file it will open and you can edit the code. Next  delete all of the code in this file but DO NOT save yet.
4
Once you have removed the code replace it with:
{% section 'page-sections-team' %}
	

For your store you would need to replace the 'page-sections-team' text with the name of the sections file you created earlier.

Important: The referenced file name must not contain any typos, must be the exact name of your sections file without the .liquid suffix and you must use the correct type of brackets. It's best to cut and paste our example above and change the referenced sections file name.

5

Now click  Save, which will be on the top right of your screen. You have created a new unique page template and it will look something like this:

6
Now you edit your Team page (or whatever you are working on) in the page editor.
7
Select your newly created page template.

8
Finally, you can now go to the Theme editor and add some blocks of content to your Team page using your newly created page template. Please see the article linked below for more on assigning templates and using sections.

Still need help? Contact Us Contact Us