Accent

Sections and regions

Sections are content types: data-accent-content, data-zone, data-label.


A section is a content type

There is no separate "section template" registry. A content type whose fragment output's partial emits an editable region can be inserted as a section: the partial renders once at insert, the rendered chrome is baked into the page as real nodes, and every region in it edits inline.

The reference example (sections/two-column):

<section class="two-column py-4">
  <div class="container">
    <div class="row g-4">
      <div class="col-md-6" data-accent-content data-zone="left"  data-label="Left column"></div>
      <div class="col-md-6" data-accent-content data-zone="right" data-label="Right column"></div>
    </div>
  </div>
</section>

One root element; any number of regions inside it. Insert it from the editor's section chooser and both columns are editable, with the regions listed in the document map.

The marker is the whole contract

One attribute — data-accent-content — is how a template says "content goes here." What lands there depends only on where the template is applied:

Position What the region receives
Document template (the page shell) the page's body — see the content region
Fragment partial (a band inside the body) the author's content, edited in place — the section case on this page

Same attribute, same meaning, one grammar. Nothing else is declared: no "section template" type, no capability flag, no registry.

How that plays out for a section:

  1. Detected from the source. The CMS reads the template's own markup — authored in the admin or a file in the site or its theme — and notes that it offers a region.
  2. Offered as a section. Every content type whose fragment output names such a template appears wherever sections are inserted: the section chooser, and the document map's "Add … below" and "Add … inside".
  3. Baked on insert. The template renders once with the section's option values, and the rendered chrome lands in the page as real nodes; each marked element becomes an editable region with its own row in the document map. The instance remembers its type and its options, so an option change re-bakes it with content preserved.

Without the marker, the same type inserts as a sealed embed — its fragment renders as one closed box with nowhere to add content inside. Insertion keys off the type's nature, never off which menu you used, so a type whose template lacks the marker is a leaf everywhere. If a section you expected to hold content arrives sealed, the fix is in its template: put data-accent-content on the element that wraps its content hole.

If you remember "section templates"

Earlier versions had a separate template type for this — chrome presets with data-carbon-content regions, chosen from a Section templates admin page. That registry is gone; the marker it was built around is the mechanism above, renamed data-accent-content. Anything placed from the old registry keeps rendering, because its chrome was baked into the page when it was inserted.

The region triple

Regions carry the identity triple in attribute form:

Attribute Role Contract
data-accent-content Mechanism — "this element is an editable region." Required.
data-zone Address — the region's slug. Optional. Lowercase slug, unique among the page's zones. The Page-content slot's implicit id is primary.
data-label Title — the human name shown in the doc map. Optional, free to change, may duplicate.

For hand-editing, marker + label is the complete grammar. data-zone exists for everything that addresses a region from outside the page: the composition API ("embed partial P into zone left"), option-change re-bakes that must re-seat content into the matching region, and the shell-slot grammar. A zoneless region is listed, not addressable — fine until something needs to target it.

Options: axes, not variants

A section type declares its design axes as options fields with closed value sets (width: container | fluid | slim | prose …). Placed sections edit their options from the document map — a dropdown per axis — and the chrome re-bakes with content preserved (matched by zone id, position as fallback). One type with two axes replaces what would otherwise be a hand-authored variant per combination.

Prose stays prose

Paragraphs, headings, and lists are the editor's native text — they are never content types. The system wraps loose prose in an invisible ghost holder so text and sections can sit side by side; ghosts impose no markup on the live output.

Deep records

The content model — design record rev 5 ("slots move onto templates; the section registry dissolves"), Section templates — what is live today (the marker's full chain from detection to bake, and the registry-era name map), the declaration-side name for the same container/leaf line — the children contract — in Component declarations, and the zones design in Composition API design record.