Shopify limits the templates in the admin to those included in your published theme. Merchants often require access to templates in an unpublished theme but are not ready to publish the new theme to unlock them. To address this, we suggest completing one of these workarounds for current theme versions or vintage theme versions.
Current Theme Versions
This adjustment applies to Online Store 2.0-compatible theme versions. Complete this adjustment if your theme version is compatible with Online Store 2.0. There are different steps for vintage theme versions.
Templates in an OS 2.0 theme are always accessible in the theme editor's page selector, but will not be assigned to any product, page, etc. until the theme is published. This adjustment serves mainly to reveal the template in the Shopify admin and assign it to specific products, collections, pages, or blogs.
For this example, we will be accessing the Product Scrolling product template in Flex (unpublished) while a Parallax theme is published.
Step 1 - Back up your theme
Since this adjustment involves changes to the theme files for the live theme, duplicate your published theme to create a backup (Actions > Duplicate). This is only needed if an error is made during the next steps—if anything goes wrong, simply publish the backup theme file.
In this example, Parallax is duplicated (Copy of Parallax).
Step 2 - Access the code for the unpublished theme
For the unpublished theme (Flex), select Actions then Edit code.
Under Templates, locate the name of the template you're going to make accessible.
For this example, we need the product.scrolling.json file.
No changes are needed here—we just need the 'scrolling' name confirmed for the next step.
Step 3 - Create a mock template
Back in your Themes area of the Online Store, select Actions then Edit code beside your published (Parallax) theme.
Under Templates, select Add a new template.
For Create a new template for, select the base template (for this example, product).
Select JSON for Template type. This is a key difference between vintage and current themes, as vintage themes use Liquid for templates.
For the File name, add the custom template's name (scrolling for this example). This needs to match the spelling of the unpublished theme's template name.
Select Create template.
Open the default Template file for the template type (e.g. product.json).
Copy the code from the default file to replace the new file, then Save.
Step 4 - Confirm the template is accessible
Open the theme editor to check if the template is now accessible in the page selector.
The template should now also be accessible in the Theme templates portion of the Products, Pages, and Blog posts areas if the admin.
Vintage Theme Versions
The process is different for theme versions released before Online Store 2.0. Complete this adjustment if your theme version is not compatible with Online Store 2.0.
In order to view a template that is not available in your live theme, you will need to match the template with the template in your unpublished theme. Please see the instructions below for how this process should be handled.
Step 1 - Locate the template you'd like to preview
Please head to Online Store > Themes > Edit code > Templates in your unpublished theme, here, you can find the template you'd like to preview in your live theme. For this example, we'll be using the "page.details" template. Please take note of the title of the template as seen in the screenshot below:
We now know that we will want to preview the "page.details.liquid" template in our live theme.
Step 2 - Make the template accessible
Confirm that the name of your new template matches the name of the template in your unpublished theme.
Now that we know the name of the template we'd like to view in our live theme, we're going to head into our live theme and head to the "Templates" directory, here, we can create a new page template titled "page.details". This is the only step that is required, therefore, please avoid replacing any content in the generated file.
Previewing the Template
Now that we have created a template that matches the template in your unpublished theme, you can now preview this template on your live theme by selecting the template from your drop-down menu on any page in Shopify.