Who this is for. Whoever creates layouts under Customization › Layouts, and the developer whose template a layout points at. After this page you can fill in a layout form knowing what each field changes, and find out in two minutes why a layout renders the wrong thing or nothing.
The layout form
| Field | What it affects |
|---|---|
| Name (required) | What editors see when they choose a layout or add a component, and what the admin lists. Free to change. |
| Identifier | A stable machine name for the API and integrations: see Site scoping, identifiers and hiding. |
| External ID | An id from another system, for imports that must find the same layout again. |
| Site | One site, or every site of the client when left empty. |
| Controller | Which kind of record may use the layout, or None (Component) for a component layout. The single most important field: see Page and component layouts. The form does not show it for templates under components/. |
| Template | The file that renders the layout, chosen from a tree of the template files on the server. |
| Areas, Area groups | The fields editors fill in, and the sections of the editing form: the unit Layout areas, groups and attributes. |
| Image (Categorization tab) | The thumbnail authors see when adding a component. |
| Category (Categorization tab) | A place in the tree of layout categories. Both are on Thumbnails, categories and the author's picker. |
| Custom fields | Shown when the site defines custom fields for layouts (below). |
The template path
The layout stores the template as a path relative to the theme's templates/ folder, such as pages/pages/landing.html, and nothing more: there is no link to the file. The path is resolved like any template, in the site's engine, first in the site's own templates and then in the platform's. Moving or renaming the file therefore breaks every layout that names it, and the layout form will not show the file until it is on the server.
When the file is not there:
- Smarty prints
Template not found: pages/pages/landing.htmlwhere the page or component should be, and the response is still HTTP 200; - Twig raises an error, so the page fails with the site's error page;
- a component layout with no template set renders nothing. A page whose layout has no template falls back to the controller's default template, such as
pages/pages/show.html.
The two-minute diagnostic: open the layout and copy its template path; check that exact path, with its case, is in the branch the environment deploys (git ls-files templates/pages/pages/landing.html); check the environment's last deploy includes the commit; and check, in the record's editing form, that the record uses this layout at all. A template can ask the same question of a layout with hasExistingTemplate(), which looks only in the site's own templates/ folder.