Template columns

A template is kept in conf/templates: a Sheet per template on Google Drive, a JSON file per template in a folder or Git site. It has three tabs. The console’s Templates section writes them for you; this page is for reading or writing them by hand.

The template tab

Rows of key and value.

Key

What to write

When empty

label

The name authors see when they pick a template.

The template’s file name

allowed_models

Content models, separated by commas, whose items may be children of pages made from this template.

None

The structure tab

One row per component, in screen order. Its components are locked: the same on every page, changed only here. A container marked editable is where each page writes its own components.

Column

What to write

When empty

component_id

A name for the row: lowercase letters, digits and hyphens, starting with a letter. It must be unique in the template.

The row is skipped with a warning

component_type

container, fragment or the name of a component (hero, text, nav...).

The row is skipped with a warning

parent

The component_id of a container this row goes inside.

At the top of the page

editable

yes on a container that pages write into. Only containers can be editable.

Locked

policy

The name of a row of conf/policies: the components authors may add to this container.

Any component

element

The HTML element the container is written as: div, section, article, aside, nav, main, header, footer.

div

fragment

For a fragment row: the name of the fragment it shows.

Required for a fragment

variants

Variants of the component, separated by commas.

None

fields

On a content model’s detail pages: the item fields this locked component shows.

None

The layout tab

One row per component of the structure that needs more than the defaults. A row left out spans the full 12 columns. Pages and fragments have a layout tab of the same shape in their settings.

Column

What to write

When empty

component_id

The component_id of a structure row.

The row is ignored

component_type

The row’s type, repeated only to make the tab easier to read.

Nothing changes

a breakpoint (sm, md, lg...)

How many of the 12 columns the component spans from that width up: 1 to 12.

The span of the smaller breakpoint, else 12

offset

Columns left empty before the component, per breakpoint: md:1, lg:2. From 0 to 11.

None

hidden

Breakpoints at which the component is not shown, separated by commas.

Shown everywhere

element_id

An id for the element, for links to a part of the page: letters, digits, - and _.

None

custom_class

Class names of the theme, separated by spaces.

None

element

The HTML element, as in the structure tab.

The structure’s, else div

background

A background the theme names, such as surface. It becomes the class --bg-<name>.

None

width

content, band, full: content stays at the reading width, band runs edge to edge with its content at the reading width, full runs edge to edge.

content

Breakpoints

The breakpoint columns of the layout tab come from the theme’s grid. Each starts at a screen width in pixels; a theme can move them.

Breakpoint

Bootstrap grid

Tailwind grid

base

0px

0px

sm

576px

640px

md

768px

768px

lg

992px

1024px

xl

1200px

1280px

xxl

1400px

2xl

1536px