This article explains how to create additional page.details templates. For basic information about this specialized template, check out this article.
In order to use the 'page.details' template, the theme will need to be published. The templates from which you can select are limited to the templates available in your currently published theme.
If you are unable to currently publish your theme and would still like to set up the ‘page.details’ template, we have instructions on how to access unpublished templates here.
Supported Versions
The details shared here apply to the most recent versions of Turbo, Parallax, Retina, Mobilia, Responsive, and Artisan. To keep your theme up to date, check out this helpful document.
For information on duplicating the page.details template included in the Flex theme, check out this article.
By default, any page that is using the page.details template will contain the same content.
The page.details template is a robust page template with a number of configurable content blocks. This template is optimal for creating a beautiful About Us page, or to give one of your favorite internal pages a facelift. If you would like to have different page content and sections on different pages, follow these instructions.
Note: If you're looking to create a high number (10+) of custom pages with unique features/content-blocks on each, we advise seeking a customized solution from one of our recommended Shopify Experts, with whom you can discuss your custom page requirements and consider the use of Shopify's Metafield implementation for this level of unique customization. An excessive number of additional custom page.details templates will result in difficulties using the theme editor.
Step 1: Add a new template
First, go Online Store > Themes > Actions > Edit Code > Templates > Add new template.
Select 'page' below Create new template for, then click the toggle for liquid.
Name it 'details-2' using the File name field. Select 'Create template'
Important: You must start the name you enter here with the word "details" in order for all features to work. For example, entering "details-2" (which becomes "page.details-2.liquid") or "details-my-page" (which becomes "page.details-my-page.liquid") will work, but "my-page" (which becomes "page.my-page.liquid") will not.
Step 2: Edit the template code
Remove all the code that is in the file you just created and replace it with this code:
{% comment %} The contents of the page.details-2.liquid template can be found in /sections/page-details-2-template.liquid {% endcomment %} {% section 'page-details-2-template' %}
Save.
Step 3: Add a new section
Next, under the Sections folder, click 'Add a new section'
Call this new Section 'page-details-2-template' and click 'Create section'
Step 4: Modify the section code
Copy all the code from the page-details-template.liquid into the new page-details-2-template.liquid
Save.
Step 5: Change the template your page uses
Go to your Pages, select the page you want to have this different template applied to, and then select page.details-2 from the Template suffix option:
Then you'll likely want to add this page to a menu in your navigation. After you've done that, you can configure the content blocks in the Theme Editor (Customize).
In the shop preview, click on the page that has been assigned the page.details-2 template and you will see options to add content blocks unique to that page.
Need even more pages?
This process can be repeated if you need still more different page content for different pages by creating more templates and sections and following the naming conventions as the above instruction, such as:
- Template: page.details-3.liquid
- Section: page-details-3-template.liquid
- ...and so on
Please be aware, however, that a high number of custom page or product templates can cause performance issues with your store or the theme editor. We typically recommend using 10 or fewer custom pages, but this can vary based on a variety of factors. If you need more unique layouts than this, you likely would benefit from hiring a developer to create custom code.
If you find that your store is generating error messages or the theme editor does not load properly, you may have created too many page or product templates and will need to remove one or more to restore full functionality.
Custom Code
Please note that this change involves making direct changes to the theme code. If you encounter difficulties with this, please contact a third-party developer for more troubleshooting, customization or functionality.