Who this is for. Content modellers looking after a client with several sites or a long-lived site, and integrators who address layouts from code. After this page you can share a layout between sites, refer to it safely from an integration, and retire it.
Which sites a layout belongs to
A layout's Site field holds one site, or nothing. With a site, the layout is offered only on that site; left empty, it is shared by every site of the client. On a client with several sites, a record is offered the layouts of its own site plus the shared ones, and the component picker likewise offers the current site's component layouts plus the shared ones.
On this documentation site, for example, the three guide layouts (Hub Guide, Hub Guide Unit, Hub Guide Page) have no site, while page layouts such as Hub Developer Docs belong to site 66 only.
- Share a layout when every site renders it with the same template and the same areas. Input types are already shared by every site of the client, so a shared layout's areas work everywhere.
- Give each site its own when the sites diverge, even if they start as copies. Duplicate in the layout list makes the copy.
- A record keeps its layout if the layout is later moved to another site or hidden: it is still offered on that record's form, and the record still renders. It is no longer offered to new records.
The identifier
A layout's Identifier is a stable machine name, such as hub-guide-page, for addressing the layout from configuration, imports and the API without knowing its database id, which differs between a development copy and production. It is unique among the layouts of the same site (and among the shared layouts). Where an API write takes a layout, the identifier can be given in place of the id.
- Set one on every layout that code refers to. With it in place, the display name is free to change.
- Never change it once something uses it; it is the one name that is meant to be permanent.
- Duplicate clears the identifier on the copy, so two layouts never share one by accident.
Hiding a layout
Hide, in the actions of the layout list, is the way to retire a layout. A hidden layout is no longer offered to new records or in the component picker, and everything that already uses it keeps rendering. Two things to know:
- A hidden layout disappears from the layout list too. Note its id before you hide it.
- The admin has no button to show it again. The layout's
hiddendate can be cleared by editing the layout through the API (PUT /cdna-api/common/layout/{id}with"hidden": null).
Delete is offered in the list only to users of the Developer type. It cannot be undone and removes the layout's area definitions with it. Hide by default; delete only a layout that was never used, after checking that no record or component uses it. The full routine for retiring layouts and areas is on Renaming and retiring without losing content.