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
string|array
string
string
string
boolean true
string
array
array
array
array
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
string
Required

true

The field's type. See Field Types.

fields:
  - identifier: my_identifier
    type: Text
Copied!
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
Type
string

The same as for label above.

fields:
  - identifier: my_identifier
    type: Text
    description: Static description
Copied!
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
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
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.

alias
Type
string

Defines an alias for the identifier . This alias is used in Fluid templates and everywhere else you need to access the field value. There is no fallback to the identifier. If set, you have to migrate all existing occurrences to the new alias.

fields:
  - identifier: my_identifier
    type: Text
    alias: myAliasIdentifier
Copied!
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
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!
l10n_mode
Type
string

Controls how the field behaves in localized records. Possible values are exclude (the value of the default language record is kept and the field is not shown) and prefixLangTitle (the value is copied and prefixed with the language title on localization). See l10n_mode.

fields:
  - identifier: my_identifier
    type: Text
    l10n_mode: exclude
Copied!
l10n_display
Type
string

Controls how the field is displayed in localized records. Possible values are hideDiff (hides the diff view of the default language value) and defaultAsReadonly (shows the default language value as read-only). See l10n_display.

fields:
  - identifier: my_identifier
    type: Text
    l10n_display: defaultAsReadonly
Copied!
exclude
Type
boolean
Default
true

If set, backend users can only edit this field if their backend user group explicitly allows it. Content Blocks enables this by default, contrary to TCA, where it defaults to false . See exclude.

fields:
  - identifier: my_identifier
    type: Text
    exclude: false
Copied!
renderType
Type
string

Selects an alternative FormEngine element for the field. Only available for the field types which document it, as core TCA only defines render types for a subset of TCA types. See the TCA types reference for the render types available per TCA type.

fields:
  - identifier: my_identifier
    type: Textarea
    renderType: codeEditor
Copied!
behaviour
Type
array

Field behaviour options. The most commonly used one is allowLanguageSynchronization , which lets editors choose between a custom value and the value of the default language record. See allowLanguageSynchronization.

fields:
  - identifier: my_identifier
    type: Text
    behaviour:
      allowLanguageSynchronization: true
Copied!
fieldInformation
Type
array

Renders informational text directly above the field. See TCA fieldInformation.

fieldControl
Type
array

Adds buttons next to the field, for example a link or wizard popup. See TCA fieldControl.

fieldWizard
Type
array

Renders additional widgets below the field, for example defaultLanguageDifferences or localizationStateSelector . See TCA fieldWizard.