A Composite is built out of sections — ordered slots that stack into one final document. A section is a slot role, not a content type: the slot declares its position in the output, and whatever fills the slot (a template, a TOC, a short piece of glue prose) decides what prints there.
The three section variants
Every section is one of three kinds. A Composite’s sections array is a list of them in the order they appear in the final document.
Holds a reference to a template (or clause) in the library. The template renders its content into the slot. Updating the template updates every Composite that references it on the next render.
A placeholder that renders a table of contents at this position in the final output. It’s back-filled after the surrounding sections render — the heading positions it lists only exist after the page layout settles.
Short content authored directly in the composer — usually a bridging line or a wrapper paragraph between two referenced templates (“The following endorsements apply:”). Doesn’t live in the template library; it’s scoped to this Composite.
A section’s variant is decided when the slot is created and doesn’t change. To turn a glue section into a reusable template, there’s a separate “promote to library” action — see the composer’s docs.
Order and nesting
Sections are an ordered list. The first section in the list prints first; the last prints last. Rearranging the list changes the output order with no other side effects.
A section can also nest children — a template or glue section can own a sub-list of further section slots, so a two-level outline (parts and sub-parts) fits the model naturally. The nesting is capped at two levels — Composites are not arbitrarily deep trees.
Every section always renders
A Composite has no “conditional section” variant. The sections list is the list of slots that run, in order, every time. If a slot needs to appear sometimes and not others, the decision happens inside the slot’s content, not at the Composite level — the slot is always present; what it prints can be empty.
See How conditional logic works for the pattern — a conditional block at the top of the section’s template collapses its body when the condition fails, leaving the slot visually empty.
Why structured this way? Section order is a layout decision (where on the page, which comes first). Content presence is a data decision (does this customer need the EU clause). Keeping the two layers separate means a jurisdictional clause always occupies “slot 4” and the final PDF prints the right language — or nothing — in that position without the Composite having to be rebuilt per customer.
How data flows across sections
Each template section carries its own schema. The Composite declares section bindings — which section’s schema contributes which fields to the Composite’s combined schema — so sample data authored once at the Composite level feeds every section correctly.
Glue sections share the Composite’s schema. They’re fragments, not independent templates, so they don’t carry their own data shape.
See Schema for the full data-composition model.
See also
- Template vs Composite — why Composites exist and when to pick one
- Schema — how fields compose across a Composite’s sections
- How conditional logic works — the mechanism for making section content optional
- Snippet library — reusable fragments that live inside a section, not as sections themselves