Who this is for. A theme developer who has deployed a placeholder template and now needs a layout to point at it. After this page you will have a page layout called Article, and know what each field of the layout form decides.
The form
Open Customization › Layouts and add a layout. The form's fields:
| Field | For the article | What it decides |
|---|---|---|
| Name | Article | The name editors see when they choose a layout, and the one you find it by in the admin |
| Identifier | article, or empty | Optional. A stable name for reading the layout through the API; it must be unique |
| Site | Empty, or the site | Shown only when the client has more than one site. Empty makes the layout available on all of them |
| Controller | Show Page, under Pages | Which kind of record may use the layout; see below |
| Template | pages/pages/article.html | The file the layout renders with, chosen from a tree of the files the admin finds in the site's templates/ folder on the server |
| Areas | On the next page | The fields editors fill in |
If pages/pages/article.html is not in the template tree, the file has not reached the server: go back to Commit and deploy it. The tree is read from the server each time the form opens, and offers only the files it finds there.
The controller makes it a page layout
The controller is what turns a layout into a page layout: when an editor creates a page, the layout list offers only layouts whose controller is Show Page under Pages, and leaves out hidden ones. Left at None (Component), the layout becomes a component layout, for blocks placed inside other records, and never appears when a page is created. For a template under components/, the form does not offer a controller at all.
The other choices, for the other kinds of record a layout can render:
| Group | Controllers |
|---|---|
| Blogs | List Blog Posts, Show Blog Post |
| Books | Show Book, Show Unit, Show Book Page |
| FAQ | Show Page, Show Question |
| Forms | Show Form |
| Pages | Show Page |
| Products | List Products, Show Product, Show Product Category |
There are two Show Page choices, one under FAQ and one under Pages. For an ordinary page, pick the one under Pages.
Save, and check
Save the layout. Then open Content › Pages and start adding a page: Article should be in its layout list. If it is not, the controller is wrong or the layout is hidden. Keep the page form for Create and publish a page; first give the layout its areas.