Templates control the layout and structure of different page types in your Shopify store. Horizon uses JSON templates for maximum flexibility and customization.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Shopify/horizon/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Horizon includes 13 template files that define how different pages are rendered:- 12 JSON Templates: Modern, section-based templates
- 1 Liquid Template: Legacy gift card template
Template Types
Homepage Template
Homepage Template
index.json
The main homepage template.File:templates/index.jsonPurpose: Controls the layout of your store’s homepageDefault Sections:- Hero or slideshow section
- Featured collections
- Featured products
- Content sections
Product Templates
Product Templates
product.json
Main product page template.File:templates/product.jsonPurpose: Display individual product detailsCommon Sections:- Product information
- Product media gallery
- Product recommendations
- Related products
- Reviews
- Variant selection
- Add to cart functionality
- Product description
- Image galleries
- Inventory status
Collection Templates
Collection Templates
collection.json
Main collection page template.File:templates/collection.jsonPurpose: Display collection of productsSections:- Collection header
- Product grid
- Filters and sorting
- Pagination
list-collections.json
All collections listing.File:templates/list-collections.jsonPurpose: Display all store collectionsFeatures:- Collection cards
- Collection images
- Collection descriptions
Cart Template
Cart Template
cart.json
Shopping cart page template.File:templates/cart.jsonPurpose: Display cart contents and checkoutSections:- Cart products list
- Cart summary
- Discount code input
- Checkout buttons
- Cart recommendations
- Quantity updates
- Product removal
- Subtotal calculation
- Shipping estimates
- Order notes
Blog Templates
Blog Templates
blog.json
Blog listing page.File:templates/blog.jsonPurpose: Display blog posts listSections:- Blog header
- Article cards
- Pagination
- Tags filter
article.json
Individual blog post template.File:templates/article.jsonPurpose: Display single blog postSections:- Article header
- Featured image
- Article content
- Author info
- Comments
- Related articles
Page Templates
Page Templates
page.json
Standard page template.File:templates/page.jsonPurpose: Display static pages (About, FAQ, etc.)Sections:- Page header
- Page content
- Custom sections
page.contact.json
Contact page template.File:templates/page.contact.jsonPurpose: Contact form and informationSections:- Contact form
- Store information
- Map (if configured)
- Social links
Search Template
Search Template
search.json
Search results page.File:templates/search.jsonPurpose: Display search resultsSections:- Search input
- Results grid
- Filters
- Pagination
- Product results
- Page results
- Blog results
- No results state
Password Template
Password Template
password.json
Password protection page.File:templates/password.jsonPurpose: Store password entry for protected storesSections:- Password form
- Store message
- Social links
- Coming soon pages
- Private stores
- Development stores
404 Template
404 Template
404.json
Error page template.File:templates/404.jsonPurpose: Page not found errorSections:- Error message
- Search bar
- Featured collections
- Homepage link
- Helpful error message
- Search functionality
- Navigation options
- Related content
Gift Card Template
Gift Card Template
gift_card.liquid
Gift card display template.File:templates/gift_card.liquidPurpose: Display gift card detailsType: Liquid template (legacy format)Features:- Gift card code
- Balance display
- Print button
- QR code
- Apple Wallet integration
This is the only Liquid template in Horizon. All others use JSON format.
Template Structure
JSON Template Format
All modern templates follow this structure:Template Anatomy
| Component | Description |
|---|---|
sections | Object containing all sections |
section-id | Unique identifier for the section |
type | Section type (matches section filename) |
blocks | Blocks within the section |
block_order | Array defining block sequence |
settings | Section-specific settings |
order | Array defining section sequence |
Creating Custom Templates
1. Duplicate Existing Template
2. Edit Template
3. Assign to Page
- Go to Online Store > Themes > Customize
- Navigate to page
- Click “Change” next to template
- Select your custom template
Template Hierarchy
Shopify follows this hierarchy when rendering pages:- Alternate Template (if assigned):
page.custom.json - Default Template:
page.json - Fallback: Built-in Shopify default
Template Naming Convention
| Pattern | Example | Use Case |
|---|---|---|
[type].json | page.json | Default template |
[type].[name].json | page.about.json | Alternate template |
[type].liquid | gift_card.liquid | Legacy liquid template |
All Templates Summary
| Template | Type | Purpose |
|---|---|---|
index.json | JSON | Homepage |
product.json | JSON | Product page |
collection.json | JSON | Collection page |
list-collections.json | JSON | All collections |
cart.json | JSON | Shopping cart |
blog.json | JSON | Blog listing |
article.json | JSON | Blog post |
page.json | JSON | Standard page |
page.contact.json | JSON | Contact page |
search.json | JSON | Search results |
password.json | JSON | Password page |
404.json | JSON | Error page |
gift_card.liquid | Liquid | Gift card |
Template Best Practices
Common Template Patterns
Adding a Section
Reordering Sections
Just change theorder array:
Removing a Section
- Delete from
sectionsobject - Remove from
orderarray
Related Resources
Sections Reference
Available sections for templates
Customization Guide
Learn template customization