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 we recommend speaking to Storetasker. They are a team of professional theme developers who carry out a wide range of custom tasks for a one-time fee, and they are well acquainted with our themes.
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
On the theme click on the button with the three dots and select the Edit code option.
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:
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.