Layouts and templates
The four layouts this theme uses, which pages get each one, and what makes the MediSpa layouts different.
Layouts and templates
Shopify picks a template from the resource being rendered, and the template picks a layout. This theme has more of both than a typical store, mostly because MediSpa pages need a different script environment from the main catalogue.
The layouts
| Layout | Used by | Purpose |
|---|---|---|
layout/theme.liquid | 92 templates | The main storefront |
layout/theme.medispa-redesign.liquid | 13 MediSpa templates | MediSpa treatment and overview pages |
layout/theme.medispa-lp.liquid | templates/page.medispa-lp.json | MediSpa paid-traffic landing page |
layout/theme.redirect.liquid | collection.redirect.json, product.redirect.json | Stripped page used for redirect targets |
layout/gift_card.liquid | templates/gift_card.liquid | Shopify's printable gift card page |
layout/password.liquid | templates/password.liquid | Shopify's storefront password page |
A JSON template names its layout with a top-level "layout" key. A Liquid template uses a {% layout %} tag. A
template with neither gets theme.liquid.
What the MediSpa layouts change
The main difference is which third-party scripts are allowed to run.
Every layout loads Yett before content_for_header, and sets window.YETT_BLACKLIST to a list of patterns. Yett holds
back any script matching a pattern until something explicitly releases it. This is how the theme controls apps whose own
page-targeting settings the team cannot reach.
layout/theme.liquid blocks very little. It holds back Appstle on pages outside the subscriptions app proxy, plus the
two upsell vendors.
The MediSpa layouts block a much longer list, including Smile, Gorgias, Boost, Swym, Stamped, Rebuy, Videoly, Tolstoy
and both upsell vendors. A comment in layout/theme.redirect.liquid records the reason. These pages carry paid traffic
and their only call to action is a booking form, so every commerce app adds page weight without helping a booking.
Klaviyo, Google Tag Manager and Meta stay unblocked because the booking form and the paid campaigns need them.
Before adding a script to a MediSpa page, check whether Yett is holding it back. A script that works on the homepage and appears absent on a MediSpa landing page is usually blocked rather than broken.
JSON templates and Liquid templates
The theme has 51 JSON templates and 59 Liquid templates.
A JSON template is editable in the theme editor. Merchandisers can add, reorder, hide and configure sections there, and
the editor writes the file back. templates/index.json is the homepage.
A Liquid template is fixed markup. Changing it requires a commit. Several older pages are still Liquid templates,
including templates/page.faq.liquid and templates/page.brands.liquid.
The theme editor saves JSON template edits to the store, not to the repository. The Pull theme from Shopify workflow
copies those edits into the production branch. See
Branches and theme sync.
Alternate templates
Shopify supports suffixed templates, such as product.gift-card-pro.liquid. You assign one to an individual product or
page in Shopify Admin under Theme template.
This theme has many of them. Each MediSpa treatment has its own template, and the catalogue has several collection variants for different merchandising layouts.
Changing templates/collection.json therefore does not change every collection page. Check which template a collection
is assigned to before assuming your change applies.
Sections, snippets and blocks
| Directory | Count | What lives there |
|---|---|---|
sections/ | around 190 | Theme editor sections and section groups |
snippets/ | around 280 | Reusable Liquid fragments, including app-provided ones |
blocks/ | 20 | Theme blocks for Shopify's newer block system |
Nothing renders many of the files in sections/ and snippets/. They arrived with previous theme versions or with apps
that have since been removed. See Legacy and unused code before assuming a file is
live, and search for its name across templates/, sections/ and snippets/ before editing it.
App-provided snippets are recognisable by their vendor prefix, for example snippets/limoniapps-discountninja-*.liquid
and snippets/boost-pfs*.liquid. Treat them as vendor files. Editing one works until the app updates its theme
integration and overwrites your change.
Source map
| Concern | File |
|---|---|
| Main layout, head tags, script blocking | layout/theme.liquid |
| MediSpa treatment layout | layout/theme.medispa-redesign.liquid |
| MediSpa landing page layout | layout/theme.medispa-lp.liquid |
| Redirect target layout | layout/theme.redirect.liquid |
| Homepage layout | templates/index.json |
| Customer account templates | templates/customers/ |
| Theme settings schema | config/settings_schema.json |
| Saved theme settings values | config/settings_data.json |
| Market configuration | config/markets.json |