Content Objects
Field kinds and repeaters
Every kind of property you can add to an object type, what it stores, and how repeaters hold rows of fields.
View as MarkdownWhen you add a property in the type builder you pick its Type. The same kinds are available for the fields of a repeater and of a section.
Field kinds
| Type | Stores | Notes |
|---|---|---|
| Text | A short line (up to 255 characters) | Can be translated. Can be used as the address source. |
| Long text | Multi-line text (up to 10000 characters) | Can be translated. |
| Rich text | Formatted text | Bold, italic, lists, links, images (with an https:// or root-relative address) and headings 2 to 4 are kept; other formatting is stripped on save. Can be translated. |
| Number | A number | |
| Money | An amount | Entered with a dot or comma decimal, for example 4950.00; stored in cents. An unparseable amount blocks saving with "Invalid price "{price}". Use a dot or comma for decimals: 4950.00". |
| Yes/no | A checkbox | |
| Select | One choice from a fixed list | Enter the options one per line. Can be translated. |
| Date | A date | |
| Date and time | A date and time | Saved with your browser's time zone offset. |
| Customer | A link to a customer | Only offered when the Customers module is enabled. |
| Image | One image from the media library | Choose image, Change image, Remove image. Only public media is served. Can be translated. |
| Image list | Several images, each with alt text and a caption | Up to 50. One list for all languages; alt text and captions are entered per language. |
| Link | A button or link with a URL and a label | The URL must start with https://, http://, /, mailto: or tel:. Can be translated. |
| Icon | The name of an icon | Can be translated. |
| Color | A color | A hex value like #1A2B3C. |
| An email address | Can be translated. | |
| Phone | A phone number | Digits, spaces and ()-., with an optional leading +. Can be translated. |
| Tags | A list of short labels | Up to 50, each up to 60 characters; duplicates are removed. Can be translated. |
| Record reference | A link to one record of another type | Pick the Allowed object types. |
| Record reference list | Links to several records (up to 24) | Pick the Allowed object types. |
| Repeater | A list of rows, each with the same fields | See below. |
| Sections | A page built from content sections | See Sections properties. |
A required property must have a value; for a translatable property that means the default language.
Entering values
- Color. A color swatch opens the color picker; next to it is a hex field (
#1A2B3C). Clear colour empties it. Anything that is not a hex value is refused with "Use a colour like #1A2B3C.". - Tags. Type a tag and press Enter or type a comma to add it as a chip; Backspace on the empty field removes the last chip. A counter shows how many of the 50 you used.
- Record reference. Choose record opens the Choose a record dialog with a Search records... box; select a record and click Use selection. A chosen record can be swapped with Change record. If the property has no allowed object types yet, the field says to pick them in the type settings. A link whose target is gone shows "Record unavailable".
- Record reference list. Add records opens Choose records, where you can select several before Use selection. A counter shows how many of the 24 you linked; remove a link with the x on its chip.
- Image list. Add images opens Choose images; select several from the media library and click Use images. Each image has Alt text and Caption boxes, and you can reorder images with the arrow buttons or remove one. The images and their order are shared by all languages; the alt text and caption of each image are entered per language on the content language tabs.
These inputs also work inside repeater rows.
Linked records
A Record reference or Record reference list can only point at an existing record of one of the Allowed object types. When you save, a link to a record that does not exist, was deleted, or has a type the property does not allow is refused with "Unknown or not allowed record.". The same check applies to imports, where a file may also link to records it creates itself.
- A linked record is deleted. Records that link to it keep the stale link. Nothing breaks on the storefront: a deleted target is simply left out (an empty link, or one entry fewer in a list). Saving the linking record still works as long as you do not change that property; once you edit the property, remove or replace the stale link first, or the save is refused.
- A linked record is a draft or scheduled. The link stays valid and saves fine, but the storefront only shows the target once it is published. Until then it is left out in the same way as a deleted one.
Repeaters
A Repeater holds a list of rows that all share the same fields, for example the steps of a recipe or the prices of a service.
- Add a property of type Repeater.
- Under Row fields, click Add field for every field a row has. Give it a label, a key, a type, and tick Required or Translatable where needed. The message "No fields yet. Add the fields each row has." shows until you add the first.
- Optionally set Row label field to one of the row's fields, so that collapsed rows are titled with it. The default is No row label field.
- Click Add.
On a record, the repeater shows its rows. Add a row, fill its fields, drag a row to reorder it (the grip icon) or use the row's arrow buttons, and delete a row you no longer need. A repeater has up to 50 rows.
- A repeater can hold one more repeater inside a row (one level of nesting); that inner repeater's rows can use any other kind but not another repeater.
- A repeater as a whole cannot be translated. Translate its fields instead.
- A repeater with no rows counts as empty, so a required repeater needs at least one row.
- A row field can be any kind except Customer and Sections. Select fields in a row take their options in an options box next to the field, one per line.
See the API reference for how each kind is returned to your storefront.