ContentElements 

Folder: ContentBlocks/ContentElements

EXT:your_extension/ContentBlocks/ContentElements/cta/config.yaml
name: example/cta
fields:
  - identifier: header
    useExistingField: true
Copied!

Learn more about Content Elements.

Options 

Here you can find all common root options.

Name Type Default Required
string
string default
string automatically generated from name
bool false
string|array true
array

description

description
Type
string

This is the description of the Content Element. If you have a labels.xlf file, you should define it there with the key description. If both are defined, the translation file has precedence.

description: "Here comes my description"
Copied!

group

group
Type
string
Default
default

The group is used for the grouping of the record type selector in the edit view of records. In addition, it is used for the "New Content Element Wizard" for the tab grouping. By default, all new types are placed in the default group.

group: special
Copied!

The Core defines these groups for Content Elements:

  • default
  • menu
  • special
  • forms
  • plugins

typeName

typeName
Type
string
Default
automatically generated from name

The identifier of the new Content Element. It is automatically generated from the name, if not defined manually.

typeName: my_content_element
Copied!

saveAndClose

saveAndClose
Type
bool
Default
false

Can be activated in order to skip the edit view when adding the Content Element via the NewContentElementWizard. This can be useful if you have a Content Element or Plugin without configuration.

saveAndClose: true
Copied!

labelField

labelField
Type
string|array
Required

true

Defines which field should be used as the title of the record. If not defined, the first valid child field will be used as the label. It is possible to define an array of fields, which will be displayed comma-separated in the backend.

# a single field for the label
labelField: title

# multiple fields will be displayed comma-separated
labelField:
    - title
    - text
Copied!

fallbackLabelFields

fallbackLabelFields
Type
array

Defines which fields should be used as fallback, if labelField is not filled. The first filled field which is found will be used. Can only be used if there is only one labelField field defined.

# fallback fields will be used, if title from labelField is empty
labelField: title
fallbackLabelFields:
    - text1
    - text2
Copied!