CMS supports various field types that can be added to content models to store structured data. Each field corresponds to a specific data type and has a specific purpose.
Field type | Purpose |
---|
text | Single-line text. Used for short text values, such as name, title, subtitle. |
textarea | Multi-line text. Suitable for longer descriptions, introductory paragraphs or additional text information. |
slug | Automatically generates a URL-friendly string based on another field, usually title . Used in the formation of URLs for pages. |
Field type | Purpose |
---|
number | Numerical value with decimals. Used for prices, weights, distances. |
integer | Integer number. Suitable for counters, ratings, order numbers. |
boolean / checkbox | Toggle true/false . For example, “Publish?”, “Active?”. |
Field type | Purpose |
---|
date | Date without time. For example, date of birth, publication, deadline. |
datetime | Date with exact time. Used for events, schedule, logs. |
Field type | Purpose |
---|
image | Uploading an image. Files are stored in the files/** directory. |
file | Uploading any type of files. For example, PDF, documents, archives. |
Example of use: uploading a PDF document, logos, galleries.
Field type | Purpose |
---|
select | Dropdown list with one choice. For example, “User type”, “Category”. |
multiselect | Allows you to select multiple options. For tags, categories, features. |
Field type | Purpose |
---|
richtext | Structured text editor (WYSIWYG). Support for styles, headings, lists, etc. |
markdown | Markdown editor. For users who are familiar with markup. Converted to HTML. |
Field type | Purpose |
---|
array | Array of simple values. For example, list of tags or keywords. |
datalist | Array of objects. For example, list of links with label and url fields. |
object | One nested object with multiple fields. For example: |
Field type | Purpose |
---|
relationship | Relationship with records of another collection. For example, selecting an author (collection: authors ). |
reference | Adding blocks of different types. For example, gallery, quote, text block, etc. |
Field type | Purpose |
---|
code | Field with a code editor. Support for typescript , json and other languages. |
document | Extended WYSIWYG editor with support for structured documents. |
Tip: Always use fields according to their purpose to ensure proper validation and display of content.