Who this is for. A theme developer making a site's first page type, on the development environment, before building anything real. By the end of this unit you will have created an Article layout with three areas, a page that uses it, and a template that renders it, in the order every later page type will follow.
The whole path
- Deploy a placeholder template at the path the layout will use: this page.
- Create the layout in the admin, pointing at that file.
- Add the areas, the fields editors will fill in.
- Create and publish a page that uses the layout.
- Render the areas in the real template.
The file comes first for a practical reason: the admin can point a layout only at a template that is already on the server. The design of the page type still starts with the layout, its areas and their names, as Development starts with a layout explains; the placeholder only gives the layout something to point at. Keep Nothing changed: the four checks open for when a step does not show up.
Create the placeholder
Page templates conventionally live under templates/pages/pages/. Create templates/pages/pages/article.html with enough markup to recognise it, extending the site's own base template. The base template's path and its block name vary from site to site; use the ones your site's other page templates use.