Who this is for. Content modellers whose layouts have grown past a dozen fields. After this page you can turn a long form into sections an author can work through in order.
What the author sees
On the editing form, each group is a section with the group's name as its title and a control to collapse and expand it. The groups come first, in their own order, and the areas that belong to no group follow below them. A group none of whose areas is visible (all hidden, or all attributes) is not shown at all.
Groups change the form only. Templates read areas by name and never see groups, so grouping, regrouping or renaming a group cannot break a page. A generic renderer that wants them can read getAreaGroups() from a component or a record's active revision.
Building groups
On the layout form, Area groups has its own list below Areas: Add area group creates one, with a name, and areas are dragged into it. Order works within each group: the areas of a group are numbered among themselves, and the groups are ordered among themselves.
- Attributes and groups. An attribute that belongs to the whole block cannot sit in a group; it is moved out when the layout is saved. An attribute attached to an area always follows that area into its group. See Attributes: settings, not content.
- Removing a group. Move its areas out first: the form asks you to, and areas still in a group when it is removed go with it, content included.
When to group, and what to call the groups
- Group past about ten fields. Below that, a single list is easier; above it, authors scroll up and down looking for the field they want.
- Name groups for the author's task, not for the page's structure: Hero, Introduction, Call to action, Search and sharing, rather than Section 1 and Section 2.
- Order them in the order the author works: the content that makes the page first, supporting material next, rarely touched settings last.
- Keep settings out of groups altogether by making them attributes, so the groups hold content and nothing else.
- Use the same group names across layouts for the same purpose, so an author moving between page types finds things in the same place.