A template describes one page as data. It names section types and their settings — never markup, never a component, never a schema. The files your agent edits: All three are template_data files: every write is parsed and validated as a Builder2 document, and a file that fails is refused with INVALID_JSON or INVALID_TEMPLATE rather than written.

The document

templates/index.json
An unknown section type is skipped at render, never an error that breaks the page, so a store keeps serving pages if a type is removed. Theme check reports it so you notice. The manifest’s section_types and block_types list every type available in the theme — platform and custom — with its settings, allowed blocks, max_blocks and placement rules. Read it before writing a template rather than guessing setting ids.

Limits

The manifest returns these as limits, together with the write limits: 50 files per write and 2 MiB per file.

Section groups

The header and footer are section groups, not sections copied into every template. A group file has the same sections / order shape as a template, and is rendered around every page: header group, then the page’s template, then the footer group. Where a section may go is decided by its schema, on two independent axes: So a section meant for both a page and the footer must name both. Placing a section where its schema does not allow it is a builder2-template error.

Alternate templates

An alternate is named <template>.<suffix>: product.alternate-1, collection.wide. Which products or collections use it is stored on the product or collection, never in the template. If a product names an alternate that does not exist, the base template (product) is used.

Things to avoid

  • Hand-writing ids that collide. Section and block ids must be unique within their map.
  • Copying the header into a template. Edit the header group instead.
  • Writing data/. It is generated from your catalog on every publish; writes are refused with IGNORED_PATH.
  • Sample content. Theme check refuses lorem ipsum, “Your Store”, “Coming soon”, “Product name”, href="#" and empty images. A value you do not have should be left out, not faked.