Field kinds
Every field has a kind. In a component it decides the editor of the component’s dialog and what the cell of its Doc table holds. In a content model it decides how each item’s value is read.
Every field has a kind. In a component it decides the editor of the component’s dialog and what the cell of its Doc table holds. In a content model it decides how each item’s value is read.
Kind | In the dialog | In the Doc table |
|---|---|---|
text | A one-line box. | Plain text. |
richtext | A box where each line is a paragraph: ## starts a heading, - a bullet, [text](address) is a link, **text** is bold. A field that starts with a title shows the title in a box of its own. | Formatted text: headings, lists, links, bold. |
option | A one-line box, or a list to pick from when the field takes its values from the site (its folders, tags or content models). | The value as plain text. |
link | Its text and its address, with a button to pick a page of the site. | The text, linked to the address. |
image | The image, with buttons to choose one from the assets, give an address or remove it. | An image placed in the cell, or the name of an asset. |
code | A box that keeps the text exactly as written, spaces and all. | One paragraph per line. |
list | One item a line: [text](address), a page by its address (/en/about/) or a web address. | One paragraph per item. |
choice | A list of the component’s own choices. | The choice as plain text. |
The type column of a model’s fields tab. A value that is not of its type shows a warning, and the console’s form refuses it.
Type | What to write | Read as |
|---|---|---|
text | Any text. | The text. |
richtext | Formatted text: headings, lists, links, bold. | HTML in lists and data files. |
image | An image, or the name of an asset. | Its address. |
link | A link, or an address that starts with /, http:// or https://. | Its address. |
date | A date as year-month-day: 2026-12-02. | The same. |
datetime | A date and a time: 2026-12-02 18:30. A date alone is midnight. | 2026-12-02T18:30. |
number | Digits, with a point or a comma before the decimals. | A number. |
boolean | yes, true, x or 1 (also sim, sí, oui, ja); no, false, 0 or nothing. | true or false. |
option | One of the field’s options, in any case. | The option as the model writes it. |
tags | Names separated by commas. | A list of names. |
item | The name of an item of the model the options column names, or a link to its page. | The item’s name. |
Column | What to write | When empty |
|---|---|---|
name | Lowercase letters, digits, - and _, starting with a letter. Unique in the model. | The row is skipped with a warning |
type | One of the types above. | text |
label | The name authors see in the form. | The field’s name |
label:<language> | The label in that language, such as label:pt-BR. | The label |
required | yes when an item cannot be saved without it. | Not required |
translated | yes when each language has its own value; no when one value serves all. | yes for text, richtext, image and link; no for the others |
options | For option: the choices, separated by commas. For item: the name of the other model. | Required for option and item |
A component module lists its fields in fields: an object per field. Developers write these; the dialog and this documentation read them.
Attribute, as written | What it does |
|---|---|
name: 'text' | The field’s key in a Doc table row and in the values the component gets. Its label is the text component.field.<name> of each language. |
kind: 'richtext' | One of the kinds above. |
required: true | Listed as required here and in the component library. The component decides what an empty value does, usually a warning. |
title: 2 | For richtext: true, or a heading level from 1 to 6, when the text starts with a title. The dialog shows the title apart. |
choices: ['a', 'b'] | For choice: the values offered. |
source: 'tags' | folders, tags or models: the dialog offers the site’s own. |