The template editor

A template is drawn as a page, with the site's theme: the header, the footer and the areas that pages fill. Open it from Templates in the console: select a template and choose Edit. A new template opens here as soon as it is made.

The template as a page

The Page template in the editor: the Template badge, the Structure pieces Container and Fragment, the components list, the header and footer fragments, the main container with its padlock, and the Structure mode menu

Number

Part

What it does

1

Template

The badge and the template's title, so it is never taken for a page.

2

Structure

The pieces of a template. A Container is an area of the page; a Fragment shows a shared part, such as the header.

3

Components

The same components as in the page editor. Placed in the template, they are fixed: the same on every page.

4

A fragment

The header and the footer are fragments placed by name. Their toolbar has Edit fragment, which opens the fragment editor.

5

The padlock

Open: pages add their own components in this container. Closed: the container is the same on every page.

6

Modes

Structure to arrange the pieces, Layout to size them, Preview to see the template without marks.

Drag a piece or a component onto the page to add it, in a container or between the pieces already there. The Content tree tab lists every piece, nested as it sits.

Locked and open

Everything in a template is locked at first: a component or a container placed here shows the same on every page, and pages cannot change it. Only a container can be opened to pages. A template needs at least one open container, or pages have nowhere to put their own content; the Page template has one, called main.

The toolbar of the main container: Edit, Lock, Move up, Move down and Delete

Number

Part

What it does

1

Edit

What the container is shown as and which components it allows (below), and its styles.

2

Lock or Unlock

Closes the container or opens it to pages, as its padlock does.

3

Move up and down

Moves the piece before or after the one next to it. Dragging does the same.

4

Delete

Removes the piece and what it holds. SeedPage asks first: pages lose what they put in it.

A container's properties

The Container dialog: Shown as, set to The main content, and Components allowed, set to Any component

Number

Part

What it does

1

Shown as

The kind of area it is on the published page: a block, a section, the main content, a side column, an article, navigation, a header or a footer. Visitors do not see it, but screen readers and search engines do.

2

Components allowed

Any component, or a list the site keeps under a name, such as only text and teasers in a side column. Pages are offered only those components there.

3

Tabs

Content, and Styles when the theme has styles for containers.

The lists of allowed components are shared by every template: changing one changes every container that uses it. They are kept in the site's settings files, conf/policies, as described in Template columns.

Sizes and widths

Layout mode works as in the page editor: drag a component's edge to resize it in the 12 columns of the grid, for each device. Sizes set in the template apply to its pieces on every page; pages size their own components inside open containers.

What changes for pages

A change is saved at once, and every page made from the template shows it once the site is built again. Pages keep their content: what a page put in an open container stays in the page. If that container is locked or deleted, the page's content there is not shown, and the page gets a warning in the editor.

Templates of content types

On a site with content types, the template editor has a Content types button in its top bar. It chooses which types may have their items as pages under the pages made from this template. A template that lays out the pages of a content type also lets a fixed component show an item's fields: its Edit dialog has Item fields, where you tick the fields it shows.