Content modeling
Define the shape of your site's content: page and entry models, blocks, option sets, and the fields they hold.
A model is the shape of a piece of content: which fields a page, entry or block has, like a headline, a photo and a price. The forms in Content are built from models, and templates and the API read content by its field handles.
TipLet the AI Assistant do it. The easiest way to create or change models is to describe what you need: "Add a Team page with a photo, name, role and short bio for each person." The AI Assistant creates the model, the template and the page. Use the Models screen to fine-tune.
Four kinds of model#
| Kind | What it's for | Example |
|---|---|---|
| Page | Content with its own address | /, /about, /blog/* |
| Entry | Shared content with no address, shown on whichever pages need it | Header, footer, testimonials |
| Block | A reusable set of fields, used inside pages and entries | The SEO fields on every page |
| Option set | A shared list of choices for dropdown fields | Allergens, categories |
Pages and entries can each be single (one record, like the home page or the footer) or a collection (many records with the same fields, like blog posts or team members).
Page models#
- Pages · Entries · Blocks · Options
- New page model
- Label and path; {..} = single page
- [..] = collection: many pages under one path
- Field count; expand to see the fields
When you create a page model, choose:
- Label: its name in Content
- Path: its address, like
/aboutor/blog - Multiple records / Collection: turn on for many pages of the same kind. Each record gets its own slug, which completes its address: slug
country-sourdoughunder/menubecomes/menu/country-sourdough - Admin only: hides this content from Editors completely
- Label shown in Content
- URL path (e.g. /blog)
- Collection: one page per record, each with a slug
- Hide this content from Editors
You can change all of these later, including switching a single page to a collection.
A model's fields#
Expand a model to see its fields, each with its type, handle and label.
-
- Field: add a field
- Edit code: open the template in Site Builder
- Edit model
- ⋮ → JSON to fields, Delete model
- Type · Handle (used in templates and the API) · Label
- Edit or delete a field
- + Field: add a field
- Code icon: open the model's template in Site Builder
- Pencil: edit the model's label, path and settings
- ⋮ → JSON to fields: add fields from sample data. ⋮ → Delete model removes it
Entry models#
Entries hold content that isn't a page of its own, like the header, the footer, FAQs or testimonials. Choose Single entry (one record, like the footer) or Multiple entries (a collection, like testimonials). Collection handles end in +, like testimonials+.
- New entry model
- Single entry {..}: e.g. footer
- Collection [..]: handles end in +
Block models#
Blocks are reusable sets of fields, like seo. Define a block once, then use it in any page or entry with a Block, Collection or Stack field. Blocks have no records of their own: their content lives in the page or entry that uses them.
- New block model
- Used inside pages and entries (e.g. the SEO block)
Field types#
Text and values
| Type | Use for |
|---|---|
| Text | Titles, names, short text. Turn on Multiline for a paragraph |
| Rich Text | Formatted text, edited visually |
| Markdown | Long text written in Markdown |
| Boolean | Yes or no, like "show this banner" |
| Dropdown Options | Pick one or more from a list, or from an option set |
| Color | A colour picker |
| Date, Date Time | Dates, or dates with times |
| Number | Prices, quantities, order |
| Location | A map location |
| Emoji | A single emoji |
| JSON, Code | Raw data, or CSS and JavaScript |
Media and links
| Type | Use for |
|---|---|
| Image | A photo or graphic, resized and optimised for each visitor |
| Video | A video from your media library |
| File | A document to download, like a PDF menu |
| Link | A page on your site, or a web address |
| Reference | Records from an entry collection, like picking testimonials to show on a page |
Structure
| Type | Use for |
|---|---|
| Group | Keep related fields together under one heading |
| Collection | A repeating set of fields, like the items in a "Menu highlights" section |
| Block | One block, like the SEO fields |
| Stack | Editors choose which blocks to add, and in what order, while editing: flexible page sections |
| Data Table | A spreadsheet-like grid |
- Create fields from JSON/YAML or with AI
- Reference: link to records of an entry collection
- Stack, Collection, Block: structured groups of fields
Creating fields quickly#
Choose AI / YAML / JSON when adding a field. Paste sample data, or describe what you need with Draft with AI, and the fields are created for you, with their types worked out from the data. For example, {"bg": "image"} creates an Image field called bg.
- Draft with AI
- Sample data → fields (types inferred)
Field settings#
- Handle: the key in templates and the API
- Type options
- Required, min/max length, RegEx
- Help shown to editors
- Field label: what editors see. Handle: the key templates and the API use
- Type options, like Multiline or Multiple values
- Validations: Required, Min / Max and a RegEx pattern. These are checked when someone edits in the app, not on changes made through the API
- Field help: a hint shown to editors under the field
- Default value: pre-filled for new records. Pick GUID to give each record a unique ID
Option sets#
Option sets are shared lists of choices, each with a label and a value. Use them in Dropdown Options fields, so the same list appears everywhere, and in templates with getOptions('<handle>').
- List name
- Label / Value rows
- Handle: getOptions('allergens') in templates and the API
Changing a model#
- Renaming a field's handle keeps its content: content is stored against the field itself, not its name. Update any templates that use the old handle
- Deleting a field deletes its content in every record
- Switching a single page to a collection (or back) is done from the model's settings
WarningDeleting a field or a model can't be undone from the Models screen. If you delete something by mistake, restore an earlier version in Version history.
See Template & helper reference to use your models in templates, and Headless CMS to read content through the API.