Master pages are configurations of page sections and content sections that apply to multiple pages of the same type. For pages which use master pages, the content of the page is the combination of the sections in the master page, and in the page itself. Master pages list the sections which will be rendered on a set of pages. For portability across themes, master pages exist independently of themes.
Rules for master pages
Each page resource of a type that supports master page contains a
master_page_id column, which determines how the page is rendered. Here are the rules associated with how master pages are rendered:
master_page_idis blank by default.
master_page_idis blank, then pages render with the theme template.
master_page_idis not blank, then pages render with the master page instead of the theme template, even if
template_suffixis not blank.
- If you want to enable sections on a product, collection, article or custom page, then you will need to assign a master page to them.
master_page_idis not blank but the active theme does not have the corresponding page section file, the page falls back to rendering using the theme template
- By default master pages only contain the page section, which cannot be removed.
More details on master pages can be found on the Section themes REST API doc.
Pages which use master pages
- Custom page
- Blog article
Customizing master pages
Master pages can be customized, and populated with
content sections, through the Online Store editor. Only sections that exist in a theme’s
content directory can be added to master pages.
Merchants can make page-specific overrides of master page configurations, through the Online Store editor. The settings of master pages can be adjusted to apply bulk changes to multiple pages at the same time.