RecordTypes

Folder: ContentBlocks/RecordTypes

EXT:your_extension/ContentBlocks/RecordTypes/my-record-type/config.yaml
name: example/my-record-type
table: tx_vendor_my_record_type
labelField: title
fields:
  - identifier: title
    type: Text
Copied!

Learn more about Record Types.

Options

Here you can find all common root options.

Name Type Default Required
string true
string
string|array true
array
string
string automatically generated from name
boolean true
boolean true
boolean true
array true (for all sub properties)
boolean true
boolean true
boolean true
boolean true
string|array
boolean false
string onlyOnPages
array
boolean false
boolean false
boolean false
string

table

table
Type
string
Required

true

The custom table name to be used for the new Record Type.

table: tx_vendor_my_custom_table_name
Copied!

group

group
Type
string

The group is used for the grouping of the record type selector in the edit view of records. By default records are not grouped.

group: my_group
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!

typeField

typeField
Type
string

The field identifier to use as the type switch. This field will be automatically generated and prepended as the very first field. The item list is filled automatically as well. There is no need to define this field manually in your fields list. Useful, if you want to define multiple types for a single table (single table inheritance).

typeField: type
Copied!

typeName

typeName
Type
string
Default
automatically generated from name

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

typeName: type1
Copied!

languageAware

languageAware
Type
boolean
Default
true

If set to false, language related fields are not created. Namely sys_language_uid, l10n_parent, l10n_source and l10n_diffsource.

# disable language support
languageAware: false
Copied!

workspaceAware

workspaceAware
Type
boolean
Default
true

Creates workspace related fields. Namely t3ver_oid, t3ver_wsid, t3ver_state and t3ver_stage. If EXT:workspaces is not installed, these fields won't be created.

# disable workspaces support
workspaceAware: false
Copied!

editLocking

editLocking
Type
boolean
Default
true

If set to false, the functionality to lock the editing for editors is removed. This refers to the editlock field.

# disable edit lock field
editLocking: false
Copied!

restriction

restriction
Type
array
Default
true (for all sub properties)

There are several restrictions in TYPO3, which filter records by certain constraints.

disabled
Adds a checkbox to hide the record in the frontend.
startTime
Adds a date picker to set the start time when to display the record.
endTime
Adds a date picker to set the end time when to stop displaying the record.
userGroup
Adds a selection to choose user groups, which are allowed to view the record.
restriction:
  disabled: false
  startTime: true
  endTime: true
  userGroup: false
Copied!

softDelete

softDelete
Type
boolean
Default
true

When deleting records in the TYPO3 backend, they are not really deleted in the database. They are merely flagged as deleted. Disabling this option, removes this safety net.

# records will be really deleted in the backend
softDelete: false
Copied!

trackCreationDate

trackCreationDate
Type
boolean
Default
true

Tracks the timestamp of the creation date. Disabling this option removes this information.

trackCreationDate: false
Copied!

trackUpdateDate

trackUpdateDate
Type
boolean
Default
true

Tracks the timestamp of the last update. Disabling this option removes this information.

trackUpdateDate: false
Copied!

sortable

sortable
Type
boolean
Default
true

Tracks the order of records. Arrows will appear to sort records explicitly. Disabling this option removes this functionality. This corresponds to the TCA option sortby.

sortable: false
Copied!

sortField

sortField
Type
string|array

The field identifier to use for sorting records. If set, this will disable the sortable option automatically. This corresponds to the TCA option default_sortby. It is possible to define multiple sorting fields with an array.

# simple sort by one field in ascending order
sortField: title

# sorting by multiple fields with different orders
sortField:
  - identifier: title
    order: desc
  - identifier: text
    order: asc
Copied!

internalDescription

internalDescription
Type
boolean
Default
false

If enabled, this adds a new tab Notes with a description field. When filled with text, a record information will be displayed in the editing view. This corresponds with the TCA ctrl option descriptionColumn. This field is supposed to be used only for the backend.

internalDescription: true
Copied!

rootLevelType

rootLevelType
Type
string
Default
onlyOnPages

Restricts the place, where the record can be created. Possible values are onlyOnPages (default), onlyOnRootLevel and both. This corresponds to the TCA ctrl option rootLevel.

rootLevelType: 'onlyOnRootLevel'
Copied!

security

security
Type
array
ignoreWebMountRestriction
default false, Allows users to access records that are not in their defined web-mount, thus bypassing this restriction.
ignoreRootLevelRestriction
default false, Allows non-admin users to access records that are on the root-level (page ID 0), thus bypassing this usual restriction.
ignorePageTypeRestriction
default false (but true if table is used as foreign_table), Allows to use the record on any kind of page type.
security:
    ignoreWebMountRestriction: true
    ignoreRootLevelRestriction: true
    ignorePageTypeRestriction: true
Copied!

readOnly

readOnly
Type
boolean
Default
false

If enabled, the record can not be edited in the TYPO3 backend anymore.

readOnly: true
Copied!

adminOnly

adminOnly
Type
boolean
Default
false

If enabled, only admins can edit the record.

adminOnly: true
Copied!

hideAtCopy

hideAtCopy
Type
boolean
Default
false

If enabled, the record will be disabled, when copied. Only works, if restriction.disabled is set to true.

hideAtCopy: true
Copied!

appendLabelAtCopy

appendLabelAtCopy
Type
string

If set, the label field labelField will be appended with this string, when copied.

appendLabelAtCopy: append me
Copied!