---
title: "Type Overrides"
manual: "Content Blocks"
version: "main"
permalink: "https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:api-type-overrides@main"
source: "API/TypeOverrides/Index.rst"
rendered: "2026-09-22T14:15:39+00:00"
---

# Type Overrides {#api-type-overrides}

<!-- TODO: no Markdown rendering for "versionadded" -->

Type Overrides are a feature available for the field type [Collection](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:field-type-collection@main) and [File](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:field-type-file@main).
With them it is possible to override a type definition of an existing type when
used in the context of a Collection.

Internally the TCA option [overrideChildTca](https://docs.typo3.org/m/typo3/reference-tca/14.3/en-us/ColumnsConfig/Type/Inline/Examples.html#columns-inline-properties-overrideChildTca-examples)
is used here to override the `showitem` string for the specified type.

This feature can be used for different purposes:

-   Reorder fields of the child record
-   Remove fields from the child record
-   Add completely new fields to the child record
-   Override options like label, description, renderType etc.

For either of those purposes you need to re-define the `fields` definition
for the specified type.

> [!WARNING]
> If you use type overrides to change validation options like `required`,
> `max` or `eval` of existing fields, this won't have an effect
> when saving the record. Only the editing interface will reflect the changes,
> which might lead to inconsistencies.

## Example 1: Override Multi Type Record {#example-1-override-multi-type-record}

```yaml
name: friendsoftypo3/example
table: tx_friendsoftypo3_example
prefixFields: false
labelField: title
fields:
  -
    identifier: title
    type: Text
    label: Title
  - identifier: collection_override
    type: Collection
    foreign_table: tx_hov_domain_model_record1
    overrideType:
      record1:
        - identifier: type
          type: Select
          useExistingField: true
        - identifier: title
          type: Text
          useExistingField: true
        - identifier: custom_field
          type: Text
```

Here, the type `record1` is overridden in the context of the Collection field
`collection_override`. A type override is created with the option
`overrideType` and then with the `typeName` as the next key. From
there you define the usual configuration like in `fields`.

## Example 2: Override Single Type Record {#example-2-override-single-type-record}

```yaml
name: friendsoftypo3/example
table: tx_friendsoftypo3_example
prefixFields: false
labelField: title
fields:
  - identifier: title
    type: Text
    label: Title
  - identifier: collection_override
    type: Collection
    foreign_table: tx_hov_domain_model_record
    overrideType:
      - identifier: title
        type: Text
        useExistingField: true
      - identifier: custom_field
        type: Text
```

This is the same as for multi-type records. The only difference is that you can
omit the type key. Internally, the `typeName` `1` is used.

## Example 3: Override File Types {#example-3-override-file-types}

```yaml
name: friendsoftypo3/example
table: tx_friendsoftypo3_example
prefixFields: false
labelField: title
fields:
  - identifier: title
    type: Text
    label: Title
  - identifier: file_override
    type: File
    overrideType:
      image:
        - identifier: image_overlay_palette
          type: Palette
          label: 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette'
          fields:
            - identifier: alternative
              useExistingField: true
            - identifier: description
              useExistingField: true
            - type: Linebreak
            - identifier: link
              useExistingField: true
            - identifier: title
              useExistingField: true
            - type: Linebreak
            - identifier: example_custom_field
              type: Text
              label: 'My custom Field'
            - type: Linebreak
            - identifier: crop
              useExistingField: true
```

Lastly, type overrides can be used to re-define file definitions. In this
example the file type `image` is overridden. File Types are usually
structured in a palette. This is why there is a type Palette as the first field.

> [!TIP]
> File Types can also be re-defined on a global level. Refer to
> the [File Types API](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:api-file-types@main) for this.
