Field Types

These are the Content Blocks Field Types, which you can use out of the box. They cover mostly basic types. Custom Field Types can be developed from scratch. More semantic field types may be added over time.

If you are familiar with TCA types, then you will probably recognize most of these types. Some types have been renamed for better clarity.

Simple Field Types:

Relational Field Types:

Structural Field Types:

Special field types:

Common field options

Field options, which can be defined inside the fields array.

Name Type Default Required
string true
string true
string
string
bool false
boolean true
string full
string|array
string

identifier

identifier
Type
string
Required

true

The field's identifier has to be unique within a Content Block. Exception is within a collections' field array, as this starts a new scope.

fields:
    identifier: my_identifier
    type: Text
Copied!

type

type
Type
string
Required

true

The field's type. See Field Types.

fields:
    identifier: my_identifier
    type: Text
Copied!

label

label
Type
string

By default labels should be defined inside the labels.xlf file. But in case there is only one language for the backend you may define labels directly in the YAML configuration. Translation files have precedence over this.

fields:
    identifier: my_identifier
    type: Text
    label: Static label
Copied!

description

description
Type
string

The same as for label above.

fields:
    identifier: my_identifier
    type: Text
    description: Static description
Copied!

useExistingField

useExistingField
Type
bool
Default
false

If set to true, the identifier is treated as an existing field from the Core or your own defined field in TCA. To learn more about reusing fields read this article.

fields:
    identifier: bodytext
    useExistingField: true
Copied!

prefixField

prefixField
Type
boolean
Default
true

If set to false, the prefixing is disabled for this field. This overrules the global option prefixFields.

fields:
    identifier: my_identifier
    type: Text
    prefixField: false
Copied!

Read more about prefixing.

prefixType

prefixType
Type
string
Default
full

Determines how to prefix the field if local prefixField or global prefixFields is enabled. Can be either full (default) or vendor.

fields:
    identifier: my_identifier
    type: Text
    prefixField: true
    prefixType: vendor
Copied!

Read more about prefixing.

displayCond

displayCond
Type
string|array

Can be used to display the field only under certain conditions. Please have a look at the official documentation for more information.

# Simple, only one rule.
displayCond: 'FIELD:identifier:=:value'
Copied!
# Multiple rules combined with AND.
displayCond:
  AND:
    - 'FIELD:identifier:=:value'
    - 'FIELD:another_identifier:=:1'
Copied!

onChange

onChange
Type
string

Can be used to trigger a reload of the Content Type when this specific field is changed. Should be used, if a rule of displayCond is used for this field.

onChange: reload
Copied!