Skip to content
Content — Guide

How to rebuild a real page with Content

A worked example, start to finish: a fictional bike company's homepage, broken into reusable Templates, modeled as Contracts, authored as Components, and published through the Delivery API — including where Adapters earn their keep.

The scenario

Larkspur Cycles is a fictional handbuilt-bicycle company. Their homepage is a fairly typical corporate layout — the header and footer are the same on every page, so we'll leave those out and focus on the part that actually changes: six stacked sections, each one a candidate for its own reusable Template.

Sections 2 and 3 are the same Split Content Template, placed twice — only its Media First setting differs, which is why the photo lands on the opposite side of the text each time.

Click the graphic to enlarge. Photos: Wikimedia Commons, CC BY / CC BY-SA (Ged Carroll, Jorge Royan, Alextredz), used here for illustration only.

The content model, at a glance

Before the step-by-step, here's where it all ends up: a couple of utility Contracts, one Contract extended through inheritance, and four Templates — two of them sharing the exact same Contract.

Utility Contracts

Link
Image

Small, reusable value shapes with no story of their own — referenced from everywhere else.

Structured Contracts

Summary
extends
Summary With Media
Card Group
Nav Card

A shared shape plus one specialization — no duplicated field definitions.

Templates

Hero
Split Content
USP Cards
Explore More

Presentation, kept separate from content — the same Contract can feed more than one Template.

1

Model the reusable pieces as Contracts

Before touching a single Template, model the shapes the page is made of. Larkspur Cycles's homepage leans on a handful of small, endlessly reusable Contracts:

  • Link — a Text label and a Destination URL. Nothing else. Every call-to-action on the site is one of these.
  • Image — a Blob field for the file, plus a required Alt Text field, so accessible alt text is never optional.
  • Summary — a Heading (Short Text), a Body (Rich Text), and an enumerable Links field, referencing Link. This is the workhorse: a title, some copy, and zero or more calls to action.

None of these three know anything about how they'll be presented. That separation is the whole point — it's what lets the same Summary Contract feed a Hero one week and a plain text block the next, with no content migration.

The ebitex Content Contract builder showing the Summary Contract with three fields: Heading (Short Text), Body (Rich Text), and Links (Component, enumerable)
2

Extend a Contract with inheritance instead of duplicating it

The Hero and both Split Content sections need everything Summary already has, plus a photo. Rather than defining Heading/Body/Links a second time, Summary With Media sets Summary as its Parent Contract and adds exactly one new field: Media, a required reference to Image.

The Contract builder makes the inherited fields visible but read-only from the child, so there's never any doubt about where a field actually lives. Anything later added to Summary — an Icon field, say — would flow down to Summary With Media automatically.

The ebitex Content Contract builder showing Summary With Media's Fields tab: an "Inherited Fields (read-only)" panel listing Heading, Body, and Links from Summary, plus its own new Media field (Component, Mandatory, Allowed Contracts: Image)
3

Build Templates, and give each one real flexibility

A Contract is what the content is. A Template is how it's presented — and it owns its own settings, authored the same way a Contract's fields are. Hero and Split Content both declare supportedContractIds: [Summary With Media], so either can bind to the exact same Component.

Split Content also gets one settings field of its own: a Media First boolean. A marketer placing this Template decides, per placement, whether the photo sits left or right — without a developer touching a line of code, and without that choice polluting the content itself.

The ebitex Content Template builder showing the Split Content Template's settings field "Media First" (Boolean), with the Modifiers fieldset and a default value of False
4

Author Components against those Contracts

A Component is one concrete instance of a Contract. "Home Hero Content" is a Summary With Media Component: a heading, a Rich Text body with live markdown preview, one Link ("Shop the Collection"), and a bound Image. The generated form comes entirely from the Contract's field definitions — nobody hand-built this editor.

The same Component gets reused unmodified later in this walkthrough — once as this page's own Hero, and again, reshaped, as a card in the "Explore more" section.

The ebitex Content Component editor for "Home Hero Content", showing the Heading field, a Rich Text Body field with markdown toolbar and live preview, a Links field bound to "Shop the Collection Link", and a Media field bound to "Larkspur Hero Photo"
5

Stack Templates onto a page, and place the page on the Experience tree

A single Experience node holds exactly one Presentation — so a whole page with six stacked sections is itself just one Component, of a Contract named Page, with one field: an enumerable Sections field of FieldType Presentation. Each entry in that array is its own Template + Component + settings binding — Hero, then Split Content twice, then USP Cards, Testimonial, and Explore More.

The Home Page Component then gets bound to the site's root node, and three real subpages — Workshops, Sustainability, Find a Dealer — sit underneath it, each with a one-section Page of their own.

The ebitex Content Experience tree showing the Larkspur Cycles site with three child nodes (Find a Dealer, Sustainability, Workshops) and the root node's detail panel: Published, Payload set to Presentation → Home Page
6

Reshape a complex Contract into a simple one with an Adapter

The "Explore more" section links to the three subpages — but it shouldn't need its own separately-authored blurb for each one. Every subpage already has a Summary With Media Component as its own Hero content (a heading, a body, a photo). Reusing that directly would mean the "Explore more" section's card Contract — a plain Nav Card (just Title and Thumbnail) — has to accept a Contract it was never written against.

That's exactly what an Adapter is for: a named, reusable field mapping from one Contract to another, built visually in a node canvas. The simplest case — "Subpage to Nav Card" — declares two direct rules — Heading → Title and Media → Thumbnail:

The ebitex Content Adapter canvas for "Subpage to Nav Card": Input Contract Summary With Media, Output Contract Nav Card, with Heading connected to Title and Media connected to Thumbnail

Back on the "Explore More" Component, each card in the enumerable Cards field (FieldType Presentation, bound to a small "Nav Card" Template) points straight at a subpage's existing Hero content — the picker offers the Adapter the moment it notices the target Contract doesn't match directly, and attaches it to that one binding. Nothing about the subpage's own Component changes; a second view of it is being requested, not a second copy of it.

The ebitex Content Component editor for "Explore More", showing three Nav Card presentations, each bound to a different subpage's Hero content component via the "Subpage to Nav Card" adapter

A direct rename is the easy case. The same canvas is a small general-purpose mapping engine — the full node palette below adds Expand fields (read a structural value's own fields), For each item (cross a list boundary, with a per-item "Keep item when" filter), Switch on Contract (dispatch on a polymorphic value's real type), and If/Equals/Exists for plain logic — plus a node that relays a linked page's own configured Presentation through as-is, rather than rebuilding a card from its fields:

The ebitex Content Adapter canvas's node palette open, listing Join text, First non-null, Constant value, Convert type, Take first item, Expand fields, Expand Linked Experience, Switch on Contract, For each item, Build value, If/else, Equals, and Exists, behind a real graph mapping a linked page's fields into a card

See the full node canvas, worked through five real examples →

7

Publish the dependency closure

Publishing a page doesn't mean publishing one row. Clicking Publish… on any item computes the full dependency closure — every Component and node it actually uses — and lets you review it before committing:

The ebitex Content Publish dialog showing a closure of two items — the Testimonial content and the referenced customer portrait Image — each with a checkbox and current status

Publishing writes a version-pinned snapshot — draft edits never leak through to delivery. Larkspur Cycles's real closure, published in one pass, was 27 items: four Experience nodes, four Page Components, and every Summary/Card/Testimonial/Link/Image Component any of them touches.

8

Fetch it from the Delivery API

A front end never touches authoring tables — it reads published snapshots through an API-key-authenticated Delivery API, choosing how deep to expand references with a single resolve parameter. Fetching the homepage's Hero content directly, two levels deep, resolves the bound Image all the way to a downloadable blob URL:

GET /content/delivery/v1/components/core/{home-hero-content}?resolve=1

{
  "contract": { "externalId": "summary-with-media" },
  "content": {
    "heading": "Handbuilt bikes for the ride ahead.",
    "body": { "markdown": "Larkspur Cycles has built steel and aluminum frames…" },
    "media": {
      "mode": "reference",
      "contract": { "externalId": "image" },
      "content": {
        "image": { "url": "/content/delivery/v1/blobs/…", "contentType": "image/png" },
        "alt-text": "A handbuilt Larkspur road bike frame…"
      }
    }
  }
}

And fetching "Explore More" shows exactly what the Adapter contributed: each card descriptor now names nav-card as its Contract, not the subpage's real one, plus the two rules a renderer needs to finish the job — reading heading as the card's title and media as its thumbnail:

"cards": [{
  "component": {
    "key": "{workshops-hero-content}",
    "contract": { "externalId": "nav-card" },
    "adapter": {
      "externalId": "subpage-to-nav-card",
      "rules": [
        { "kind": "direct", "source": "heading", "target": "title" },
        { "kind": "direct", "source": "media", "target": "thumbnail" }
      ]
    }
  }
}]
Model once, present it however you need

That's the whole loop: Contracts, Templates, Components, Adapters, published, delivered.

Six Templates, eight Contracts, and one Adapter reproduced a full six-section homepage plus three subpages — with every piece of content, from the hero photo to the customer quote, reusable somewhere else on the site without being re-typed.