المفاهيم الأساسية › القوالب
القوالب الاحتياطية
A theme does not have to provide every template. When the storefront needs a page your theme has no template for, it renders that page with the platform's default theme instead.
The whole page falls back, not just the template
The default theme's template is rendered inside the default theme's layout, with the default theme's stylesheet and strings. It is never rendered inside your layout.
That is deliberate. A template written for one theme refers to that theme's CSS classes, its partials and its strings. Rendered inside another theme's layout it would reference classes that do not exist and strings that are not there, and the result would be broken in ways neither theme's author could have tested. A page that looks like the default theme is a coherent page; a page that is half of each is not.
What it means in practice
- You can ship a theme with only
layout.jinja,home.jinjaand404.jinja, and every other page the store serves will still work. - A shopper moving from your homepage to a fallback page will see the design change. For a page shoppers visit often, provide your own template.
- Your theme cannot be broken by a page the platform adds later. Until you write a template for it, the default theme renders it.
The platform's own second theme, Noor, ships without a 404.jinja on purpose. A store using Noor
shows the default theme's not-found page, in the default theme's layout — this page, working, on a
real theme.
What never falls back
A store that does not exist, or has been suspended, is not rendered by any theme. It gets the platform's own not-found page, which names no store, so that an address cannot be used to find out whether a store exists but is switched off.