YAML reference¶
The heart of a Content Block is the EditorInterface.yaml
file. Here you can
find all possible configuration options. There are slight differences, whether
you are dealing with Content Elements,
Page Types or
Record Types. In general Content Elements
and Page Types are a special concept in TYPO3. The Core already defines the
table names, the type field, etc. You just have to define a new type. This is
done by providing the name
attribute, which will be converted to the
type name. Page Types require an integer value for the type. Therefore you need
to set it additionally with typeName
.
With TYPO3 you can also create custom Record Types. They require you to define
a custom table
and a labelField
field. Per default all extra
features like workspaces, language support, frontend restrictions, etc. are
enabled. You can selectively disable each one of them, if you don't use them.
Full examples can be found in the examples repository: https://github.com/TYPO3-Initiatives/content-blocks-examples
Table of Contents
Common root options¶
- name¶
- Required
true
- Type
string
Every editing interface configuration must contain exactly one name. The name is made up of vendor and content block name separated by a
/
just like thevendor/package
notation in a traditional composer.json file. It must be unique and must have at least 3 characters. Both parts, the vendor and content block name, have to be lowercase and be separated by a dash-
.name: my-vendor/my-content-block-name
- prefixFields¶
- Required
false
- Type
boolean
- Default
true
By default, all fields are prefixed with the name of the content block to prevent collisions. In order to better reuse fields between content blocks, it can be useful to deactivate this option. Read more about reusing fields here.
prefixFields: false
- prefixType¶
- Required
false
- Type
string
- Default
full
Determines how to prefix the field if
prefixFields
is enabled. Can be eitherfull
(default) orvendor
.prefixFields: true prefixType: vendor
- priority¶
- Required
false
- Type
integer
- Default
0
The priority can be used to prioritize certain content blocks in the loading order. The default loading order is alphabetically. Higher priorities will be loaded before lower ones. This affects e.g. the order in the "New Content Element Wizard".
# this content block will be displayed before others priority: 10
- fields¶
- Required
false
- Type
array
The main entry point for the field definitions. Fields defined in this array are displayed in the backend exactly in the same order. You can create new custom fields or reuse existing ones, which are defined via TCA. Learn here what is needed to define a field.
fields: - identifier: my_field type: Text