---
title: "Record types"
manual: "TCA Reference"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3tca:types-introduction@13.4"
source: "Types/Index.rst"
rendered: "2026-10-01T16:43:17+00:00"
---

# Record types {#types-introduction}

> [!NOTE]
> **See also**
>
> [Field types (config > type)](https://docs.typo3.org/permalink/t3tca:columns-types@13.4)
> are a different concept to record types.

A `types` section is mandatory in all table definitions.

The `types` section is an array of types `$GLOBALS['TCA'][$table]['types']` each
containing a `showitem` key which determines which fields will be displayed in
the backend form for the record. Most TCA tables will only contain one type.

However, it is possible to have many types in the same table with different fields
being displayed depending on the type. Then a new database field needs to be created
to save the type with the data. This field is set in
[$GLOBALS\['TCA'\]\[$table\]\['ctrl'\]\['type'\]](https://docs.typo3.org/permalink/t3tca:confval-ctrl-type@13.4).

Defining multiple types in one table is similar to
[Single Table Inheritance](https://en.wikipedia.org/wiki/Single_Table_Inheritance)
in Object-orientated programming.

**Table of Contents**

-   [A basic table without distinct types](https://docs.typo3.org/permalink/t3tca:a-basic-table-without-distinct-types@13.4)
-   [Supporting multiple record types in the same table](https://docs.typo3.org/permalink/t3tca:supporting-multiple-record-types-in-the-same-table@13.4)
-   [Properties of types section of TCA](https://docs.typo3.org/permalink/t3tca:properties-of-types-section-of-tca@13.4)
-   [Extended examples for using the types section of TCA](https://docs.typo3.org/permalink/t3tca:extended-examples-for-using-the-types-section-of-tca@13.4)

**Subpages**

-   [Subtype migration](https://docs.typo3.org/permalink/t3tca:migration-from-subtypes-to-types@13.4)
-   [tt_content system fields](https://docs.typo3.org/permalink/t3tca:automatically-added-system-fields-to-content-types-tt-content@13.4)

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

Creating content elements has been simplified by removing the need to
define the system fields for each element again and again. This shrinks
down a content element's showitem to just the element
specific fields. See also Automatically added system fields to content types (tt_content).

## A basic table without distinct types {#types-examples-required-minimal}

A table record supporting only one type defines
which fields should be displayed in the backend form for the default type.

As an example, a comment on a blog post can be stored in a table as follows:

**EXT:my_extension/Configuration/TCA/tx_myextension_domain_model_comment.php**

```php
<?php

return [
  'ctrl' => [
    'title' => 'Comment',
    'label' => 'name',
    'enablecolumns' => [
      'disabled' => 'hidden',
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'hidden, name, email, content, date',
    ],
  ],
  'columns' => [
    'name' => [
      'label' => 'Name',
      'config' => [
        'type' => 'input',
      ],
    ],
    'email' => [
      'label' => 'Email',
      'config' => [
        'type' => 'email',
      ],
    ],
    'content' => [
      'label' => 'Comment',
      'config' => [
        'type' => 'text',
      ],
    ],
    'date' => [
      'label' => 'Date',
      'config' => [
        'type' => 'datetime',
      ],
    ],
  ],
];

```

The `types` section is mandatory.

## Supporting multiple record types in the same table {#types-optional}

If a table supports multiple record types, the type of the record must be
saved in a dedicated database field, commonly named `record_type` or just `type`.
Usually a select field is used for that purpose.

The name of this field is registered in the `ctrl` section via property
[type](https://docs.typo3.org/permalink/t3tca:confval-ctrl-type@13.4).

As an example, a blog post might have several types where the fields
displayed in the backend differ:

**EXT:my_extension/Configuration/TCA/tx_myextension_domain_model_post.php**

```php
<?php

return [
  'ctrl' => [
    'title' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:tx_myextension_domain_model_post',
    'label' => 'title',
    'type' => 'record_type',
    'typeicon_classes' => [
      '0' => 'tx-blog-post',
      'link' => 'tx-blog-post-link',
      'special' => 'tx-blog-post-special',
    ],
    'enablecolumns' => [
      'disabled' => 'hidden',
      'starttime' => 'starttime',
      'endtime' => 'endtime',
      'fe_group' => 'fe_group',
    ],
    'languageField' => 'sys_language_uid',
    'transOrigPointerField' => 'l10n_parent',
  ],
  'types' => [
    '0' => [
      'showitem' => '
        record_type, blog, title, date, author, content,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
          hidden,
          --palette--;;paletteStartStop,
          fe_group,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
          --palette--;;paletteLanguage,
      ',
    ],
    'link' => [
      'showitem' => 'record_type, blog, title, date, author, link',
      'creationOptions' => [
        'defaultValues' => [
          'author' => 'External Author',
        ],
      ],
    ],
    'special' => [
      'showitem' => 'record_type, blog, title, date, author, content, tags',
      'columnsOverrides' => [
        'author' => [
          'config' => [
            'required' => true,
          ],
        ],
        'content' => [
          'description' => 'You can use Markdown syntax for the content.',
          'config' => [
            'renderType' => 'codeEditor',
          ],
        ],
      ],
    ],
  ],
  'palettes' => [
    'paletteStartStop' => [
      'showitem' => 'starttime, endtime',
    ],
    'paletteLanguage' => [
      'showitem' => 'sys_language_uid, l10n_parent',
    ],
  ],
  'columns' => [
    'record_type' => [
      'label' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:post_types',
      'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'items' => [
          ['label' => 'Blog Post', 'value' => '0'],
          ['label' => 'Link to External Blog Post', 'value' => 'link'],
          ['label' => 'Special Blog Post', 'value' => 'special'],
        ],
        'default' => '0',
      ],
    ],
    'blog' => [
      'label' => 'Blog',
      'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'foreign_table' => 'tx_myextension_domain_model_blog',
      ],
    ],
    'title' => [
      'label' => 'Title',
      'config' => [
        'type' => 'input',
      ],
    ],
    'date' => [
      'label' => 'Date',
      'config' => [
        'type' => 'datetime',
      ],
    ],
    'author' => [
      'label' => 'Author',
      'config' => [
        'type' => 'input',
      ],
    ],
    'content' => [
      'label' => 'Content',
      'config' => [
        'type' => 'text',
      ],
    ],
    'link' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
      ],
    ],
    'tags' => [
      'label' => 'Tags',
      'config' => [
        'type' => 'input',
      ],
    ],
  ],
];

```

For each record type you can define additional
[creationOptions](https://docs.typo3.org/permalink/t3tca:confval-types-creationoptions@13.4)
and change field display definitions via
[columnsOverrides](https://docs.typo3.org/permalink/t3tca:confval-types-columnsoverrides@13.4).

It is also possible to define [previewRenderers](https://docs.typo3.org/permalink/t3tca:confval-types-previewrenderer@13.4).

You can also define icons for each type using the property
[ctrl -> typeicon_classes](https://docs.typo3.org/permalink/t3tca:confval-ctrl-typeicon-classes@13.4).

## Properties of `types` section of TCA {#types-properties}

-   **columnsOverrides**

    -   *Type:* array (columns fields overrides)
    -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['columnsOverrides'\]
    -   *Scope:* Display
    -   *Examples:* [Examples for columnsOverrides](https://docs.typo3.org/permalink/t3tca:types-examples-columnsoverrides@13.4)

    Changed or added \['columns'\] field display definitions.

    This allows different field column definitions to be applied when a record of this type is edited. Currently,
    only the display of form fields is affected, not data handling.

    A typical property that can be changed is `renderType`.

    The core uses this property to override the "bodytext" field config of table "tt_content". If a record
    of type "text" is edited, it adds "enableRichtext = 1" to trigger an RTE to the default "bodytext" configuration,
    and if a type "table" is edited, it adds "renderType = textTable" and "wrap = off" to "bodytext".

    The FormEngine basically merges "columnsOverrides" over the default "columns" field after the record type
    has been determined.

    > [!WARNING]
    > **Attention**
    >
    > It is not possible to override any properties in "Proc." scope: The DataHandler does not take "columnsOverrides"
    > into account. Only pure "Display" related properties can be overridden. This especially means that
    > columns config 'type' must **not** be set to a different value.

-   **creationOptions**

    -   *Type:* list of options
    -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['creationOptions'\]

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

    The page TSconfig option
    newContentElement.wizardItems.[group].elements.[name]
    can be defined through TCA as well:-   **saveAndClose**

        -   *Type:* bool
        -   *Default:* false
        -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['creationOptions'\]\['saveAndClose'\]
        -   *Examples:* [Example: Create the blog plugin at once](https://docs.typo3.org/permalink/t3tca:types-example-creation-option@13.4)

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

        If true, clicking on the new element wizard will take the user directly
        to the page module, rather than showing the edit form from the form
        engine.

        Can be overridden with page TSconfig option
        [saveAndClose](https://docs.typo3.org/m/typo3/reference-typoscript/13.4/en-us/PageTsconfig/Mod/Wizards.html#confval-mod-wizards-newcontentelement-wizarditems-group-elements-name-saveandclose).

    -   **defaultValues**

        -   *Type:* array
        -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['creationOptions'\]\['defaultValues'\]
        -   *Examples:* [Example: Create the blog plugin at once](https://docs.typo3.org/permalink/t3tca:types-example-creation-option@13.4)

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

        Default values inserted into the fields of the `tt_content` record on
        creation via the "New Content Element" wizard

        Can be overridden with page TSconfig option
        [tt_content_defValues](https://docs.typo3.org/m/typo3/reference-typoscript/13.4/en-us/PageTsconfig/Mod/Wizards.html#confval-mod-wizards-newcontentelement-wizarditems-group-elements-name-tt-content-defvalues).

-   **previewRenderer**

    -   *Type:* string
    -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['previewRenderer'\]
    -   *Scope:* Display
    -   *Examples:* [PreviewRenderer examples](https://docs.typo3.org/permalink/t3tca:types-example-previewrenderer@13.4)

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

    Registration of subtypes has been deprecated.  Registration of custom
    types should therefore always be done by using
    record types.See also Migration: PreviewRenderer for subtypes.To configure a preview renderer for the whole table see
    [previewRenderer](https://docs.typo3.org/permalink/t3tca:confval-ctrl-previewrenderer@13.4).

    Configures a backend preview for a content element.

    Have also a look at [configure a custom backend preview](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/ContentElements/CustomBackendPreview.html#ConfigureCE-Preview) for more details.

    Use [property previewRenderer of section ctrl](https://docs.typo3.org/permalink/t3tca:confval-ctrl-previewrenderer@13.4)
    to configure the preview globally for the whole table.

-   **showitem**

    -   *Type:* string (list of field configuration sets)
    -   *Required:* true
    -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['showitem'\]
    -   *Examples:* [Display all fields on one page of the form](https://docs.typo3.org/permalink/t3tca:types-example-showitem@13.4)

    Configuration of the displayed order of fields in FormEngine and their tab alignment.

    The whole string is a comma `,` separated list of tokens. Each token can have keywords separated by
    semicolon `;`.

    Each comma separated token is one of the following:

    -   **`fieldName;fieldLabel`**

        Name of a field to show. Optionally an alternative label (plain text label or [label reference](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Localization/Labels/Index.html#label-reference)) to override
        the [default label from columns section](https://docs.typo3.org/permalink/t3tca:columns-properties-label@13.4).

    -   **`--palette--;paletteLabel;paletteName`**

        Name of a [palette](https://docs.typo3.org/permalink/t3tca:palettes@13.4) to show. The label (plain text label or [label reference](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Localization/Labels/Index.html#label-reference)) is optional. If set, it is
        shown above the single palette fields. The palette name is required and must reference a palette from
        the palette section.

        ```php
        --palette--;;caching // Show palette "caching" without additional label
        --palette--;Caching;caching // Show palette "caching" with label "Caching"
        ```

    -   **`--div--;tabLabel`**

        Put all fields after this token onto a new tab and name the tab as given in "tabLabel" (plain text label or [label reference](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Localization/Labels/Index.html#label-reference)).

    > [!NOTE]
    > It is good practice to add a comma in excess behind the very last field name
    > as shown in the examples above. The FormEngine code will ignore this, but it
    > helps developers to not forget about a comma when additional fields are
    > added, which can suppress an annoying "Why is my new field not
    > displayed?" bug hunt.

    Extensions can also modify `showitem` values by utilizing
    `ExtensionManagementUtility::addToAllTCAtypes()`.
    See [customization examples](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ExtensionArchitecture/HowTo/ExtendingTca/Examples/Index.html#extending-examples) for details.

-   **subtypes_addlist**

    -   *Type:* array
    -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['subtypes_addlist'\]

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

    Registration of subtypes has been deprecated.  Registration of custom
    types should therefore always be done by using
    record types. See also Migration from subtypes to types.See also Migration from subtypes to types.A list of fields to add when the [subtype_value_field](https://docs.typo3.org/permalink/t3tca:types-properties-subtype-value-field@13.4)
    matches a key in this array.

    **Syntax**

    ```plaintext
    "[value]" => "[comma-separated list of fields which are added]"
    ```

-   **subtypes_excludelist**

    -   *Type:* array
    -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['subtypes_excludelist'\]

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

    Registration of subtypes has been deprecated.  Registration of custom
    types should therefore always be done by using
    record types. See also Migration from subtypes to types.See also Migration from subtypes to types.See [property subtype_value_field](https://docs.typo3.org/permalink/t3tca:types-properties-subtype-value-field@13.4).

    **Syntax**

    ```plaintext
    "[field value]" => "[comma-separated list of fields (from the main types-config) which are removed]"
    ```

-   **subtype_value_field**

    -   *Type:* string (field name)
    -   *TCA path:* $GLOBALS\['TCA'\]\[$table\]\['types'\]\[$type\]\['subtype_value_field'\]

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

    Registration of subtypes has been deprecated.  Registration of custom
    types should therefore always be done by using
    record types. See also Migration from subtypes to types.See also Migration from subtypes to types.Field name, which holds a value being a key in the
    [subtypes_excludelist](https://docs.typo3.org/permalink/t3tca:confval-types-subtypes-excludelist@13.4) array.
    This allows to add and hide fields found in the types configuration,
    based on the value of another field in the row.

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

The properties bitmask_excludelist_bits and bitmask_excludelist_bits
have been removed, it is not considered anymore when rendering
records in the backend record editing interface.Extensions still using this setting should switch to casual
$GLOBALS['TCA']['someTable']['ctrl']['type'] fields instead, which
can be powered by columns based on string values.

## Extended examples for using the `types` section of TCA {#types-example}

-   [Display all fields on one page of the form](https://docs.typo3.org/permalink/t3tca:display-all-fields-on-one-page-of-the-form@13.4)
-   [Group fields using tabs and use palettes](https://docs.typo3.org/permalink/t3tca:group-fields-using-tabs-and-use-palettes@13.4)
-   [Examples for columnsOverrides in type section of TCA](https://docs.typo3.org/permalink/t3tca:examples-for-columnsoverrides-in-type-section-of-tca@13.4)
-   [Override default values by type](https://docs.typo3.org/permalink/t3tca:override-default-values-by-type@13.4)
-   [PreviewRenderer examples](https://docs.typo3.org/permalink/t3tca:previewrenderer-examples@13.4)
-   [Example: Create the blog plugin at once](https://docs.typo3.org/permalink/t3tca:example-create-the-blog-plugin-at-once@13.4)

### Display all fields on one page of the form {#display-all-fields-on-one-page-of-the-form}

The table containing the blog comments does not contain many fields. So they can
all be displayed on one page of the backend form without using tabs:

**EXT:my_extension/Configuration/TCA/tx_myextension_domain_model_comment.php**

```php
<?php

return [
  'ctrl' => [
    'title' => 'Comment',
    'label' => 'name',
    'enablecolumns' => [
      'disabled' => 'hidden',
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'hidden, name, email, content, date',
    ],
  ],
  'columns' => [
    'name' => [
      'label' => 'Name',
      'config' => [
        'type' => 'input',
      ],
    ],
    'email' => [
      'label' => 'Email',
      'config' => [
        'type' => 'email',
      ],
    ],
    'content' => [
      'label' => 'Comment',
      'config' => [
        'type' => 'text',
      ],
    ],
    'date' => [
      'label' => 'Date',
      'config' => [
        'type' => 'datetime',
      ],
    ],
  ],
];

```

### Group fields using tabs and use palettes {#group-fields-using-tabs-and-use-palettes}

If a table has a larger number of fields, grouping them into tabs and palettes
can improves the backend user experience. Palettes have the additional value
that they can be reused across different record types.

**EXT:my_extension/Configuration/TCA/tx_myextension_domain_model_post.php**

```php
<?php

return [
  'ctrl' => [
    'title' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:tx_myextension_domain_model_post',
    'label' => 'title',
    'type' => 'record_type',
    'typeicon_classes' => [
      '0' => 'tx-blog-post',
      'link' => 'tx-blog-post-link',
      'special' => 'tx-blog-post-special',
    ],
    'enablecolumns' => [
      'disabled' => 'hidden',
      'starttime' => 'starttime',
      'endtime' => 'endtime',
      'fe_group' => 'fe_group',
    ],
    'languageField' => 'sys_language_uid',
    'transOrigPointerField' => 'l10n_parent',
  ],
  'types' => [
    '0' => [
      'showitem' => '
        record_type, blog, title, date, author, content,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
          hidden,
          --palette--;;paletteStartStop,
          fe_group,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
          --palette--;;paletteLanguage,
      ',
    ],
    'link' => [
      'showitem' => 'record_type, blog, title, date, author, link',
      'creationOptions' => [
        'defaultValues' => [
          'author' => 'External Author',
        ],
      ],
    ],
    'special' => [
      'showitem' => 'record_type, blog, title, date, author, content, tags',
      'columnsOverrides' => [
        'author' => [
          'config' => [
            'required' => true,
          ],
        ],
        'content' => [
          'description' => 'You can use Markdown syntax for the content.',
          'config' => [
            'renderType' => 'codeEditor',
          ],
        ],
      ],
    ],
  ],
  'palettes' => [
    'paletteStartStop' => [
      'showitem' => 'starttime, endtime',
    ],
    'paletteLanguage' => [
      'showitem' => 'sys_language_uid, l10n_parent',
    ],
  ],
  'columns' => [
    'record_type' => [
      'label' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:post_types',
      'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'items' => [
          ['label' => 'Blog Post', 'value' => '0'],
          ['label' => 'Link to External Blog Post', 'value' => 'link'],
          ['label' => 'Special Blog Post', 'value' => 'special'],
        ],
        'default' => '0',
      ],
    ],
    'blog' => [
      'label' => 'Blog',
      'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'foreign_table' => 'tx_myextension_domain_model_blog',
      ],
    ],
    'title' => [
      'label' => 'Title',
      'config' => [
        'type' => 'input',
      ],
    ],
    'date' => [
      'label' => 'Date',
      'config' => [
        'type' => 'datetime',
      ],
    ],
    'author' => [
      'label' => 'Author',
      'config' => [
        'type' => 'input',
      ],
    ],
    'content' => [
      'label' => 'Content',
      'config' => [
        'type' => 'text',
      ],
    ],
    'link' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
      ],
    ],
    'tags' => [
      'label' => 'Tags',
      'config' => [
        'type' => 'input',
      ],
    ],
  ],
];

```

The syntax for tabs is:

`--div--;<label>`

Where label can be plain text label or [label reference](https://docs.typo3.org/m/typo3/reference-coreapi/13.4/en-us/ApiOverview/Localization/Labels/Index.html#label-reference) (preferred).

The syntax to insert a palette is:

`--palette--;<label>;<paletteName>`

The label can be omitted.

> [!NOTE]
> **See also**
>
> [Grouping fields (palettes)](https://docs.typo3.org/permalink/t3tca:palettes@13.4)

### Examples for columnsOverrides in type section of TCA {#examples-for-columnsoverrides-in-type-section-of-tca}

Demonstrates property: [columnsOverrides](https://docs.typo3.org/permalink/t3tca:confval-types-columnsoverrides@13.4).

For example the special blog post type might require the author to be set and
use a different render type and description for the content:

**EXT:my_extension/Configuration/TCA/tx_myextension_domain_model_post.php**

```php
<?php

return [
  'ctrl' => [
    'title' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:tx_myextension_domain_model_post',
    'label' => 'title',
    'type' => 'record_type',
    'typeicon_classes' => [
      '0' => 'tx-blog-post',
      'link' => 'tx-blog-post-link',
      'special' => 'tx-blog-post-special',
    ],
    'enablecolumns' => [
      'disabled' => 'hidden',
      'starttime' => 'starttime',
      'endtime' => 'endtime',
      'fe_group' => 'fe_group',
    ],
    'languageField' => 'sys_language_uid',
    'transOrigPointerField' => 'l10n_parent',
  ],
  'types' => [
    '0' => [
      'showitem' => '
        record_type, blog, title, date, author, content,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
          hidden,
          --palette--;;paletteStartStop,
          fe_group,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
          --palette--;;paletteLanguage,
      ',
    ],
    'link' => [
      'showitem' => 'record_type, blog, title, date, author, link',
      'creationOptions' => [
        'defaultValues' => [
          'author' => 'External Author',
        ],
      ],
    ],
    'special' => [
      'showitem' => 'record_type, blog, title, date, author, content, tags',
      'columnsOverrides' => [
        'author' => [
          'config' => [
            'required' => true,
          ],
        ],
        'content' => [
          'description' => 'You can use Markdown syntax for the content.',
          'config' => [
            'renderType' => 'codeEditor',
          ],
        ],
      ],
    ],
  ],
  'palettes' => [
    'paletteStartStop' => [
      'showitem' => 'starttime, endtime',
    ],
    'paletteLanguage' => [
      'showitem' => 'sys_language_uid, l10n_parent',
    ],
  ],
  'columns' => [
    'record_type' => [
      'label' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:post_types',
      'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'items' => [
          ['label' => 'Blog Post', 'value' => '0'],
          ['label' => 'Link to External Blog Post', 'value' => 'link'],
          ['label' => 'Special Blog Post', 'value' => 'special'],
        ],
        'default' => '0',
      ],
    ],
    'blog' => [
      'label' => 'Blog',
      'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'foreign_table' => 'tx_myextension_domain_model_blog',
      ],
    ],
    'title' => [
      'label' => 'Title',
      'config' => [
        'type' => 'input',
      ],
    ],
    'date' => [
      'label' => 'Date',
      'config' => [
        'type' => 'datetime',
      ],
    ],
    'author' => [
      'label' => 'Author',
      'config' => [
        'type' => 'input',
      ],
    ],
    'content' => [
      'label' => 'Content',
      'config' => [
        'type' => 'text',
      ],
    ],
    'link' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
      ],
    ],
    'tags' => [
      'label' => 'Tags',
      'config' => [
        'type' => 'input',
      ],
    ],
  ],
];

```

While the field type `type` cannot be changed in the `columnsOverrides` the
render type `renderType` can be changed.

### Override default values by type {#override-default-values-by-type}

A blog post of type link should have a different default value for the author
field then other blog post types:

**EXT:my_extension/Configuration/TCA/tx_myextension_domain_model_post.php**

```php
<?php

return [
  'ctrl' => [
    'title' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:tx_myextension_domain_model_post',
    'label' => 'title',
    'type' => 'record_type',
    'typeicon_classes' => [
      '0' => 'tx-blog-post',
      'link' => 'tx-blog-post-link',
      'special' => 'tx-blog-post-special',
    ],
    'enablecolumns' => [
      'disabled' => 'hidden',
      'starttime' => 'starttime',
      'endtime' => 'endtime',
      'fe_group' => 'fe_group',
    ],
    'languageField' => 'sys_language_uid',
    'transOrigPointerField' => 'l10n_parent',
  ],
  'types' => [
    '0' => [
      'showitem' => '
        record_type, blog, title, date, author, content,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
          hidden,
          --palette--;;paletteStartStop,
          fe_group,
        --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
          --palette--;;paletteLanguage,
      ',
    ],
    'link' => [
      'showitem' => 'record_type, blog, title, date, author, link',
      'creationOptions' => [
        'defaultValues' => [
          'author' => 'External Author',
        ],
      ],
    ],
    'special' => [
      'showitem' => 'record_type, blog, title, date, author, content, tags',
      'columnsOverrides' => [
        'author' => [
          'config' => [
            'required' => true,
          ],
        ],
        'content' => [
          'description' => 'You can use Markdown syntax for the content.',
          'config' => [
            'renderType' => 'codeEditor',
          ],
        ],
      ],
    ],
  ],
  'palettes' => [
    'paletteStartStop' => [
      'showitem' => 'starttime, endtime',
    ],
    'paletteLanguage' => [
      'showitem' => 'sys_language_uid, l10n_parent',
    ],
  ],
  'columns' => [
    'record_type' => [
      'label' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:post_types',
      'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'items' => [
          ['label' => 'Blog Post', 'value' => '0'],
          ['label' => 'Link to External Blog Post', 'value' => 'link'],
          ['label' => 'Special Blog Post', 'value' => 'special'],
        ],
        'default' => '0',
      ],
    ],
    'blog' => [
      'label' => 'Blog',
      'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'foreign_table' => 'tx_myextension_domain_model_blog',
      ],
    ],
    'title' => [
      'label' => 'Title',
      'config' => [
        'type' => 'input',
      ],
    ],
    'date' => [
      'label' => 'Date',
      'config' => [
        'type' => 'datetime',
      ],
    ],
    'author' => [
      'label' => 'Author',
      'config' => [
        'type' => 'input',
      ],
    ],
    'content' => [
      'label' => 'Content',
      'config' => [
        'type' => 'text',
      ],
    ],
    'link' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
      ],
    ],
    'tags' => [
      'label' => 'Tags',
      'config' => [
        'type' => 'input',
      ],
    ],
  ],
];

```

### PreviewRenderer examples {#previewrenderer-examples}

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

Registration of subtypes has been deprecated.  Registration of custom
types should therefore always be done by using
record types.If you used PreviewRenderer with a subtype see section
Migration: PreviewRenderer for subtypes.

Demonstrates property: [previewRenderer](https://docs.typo3.org/permalink/t3tca:confval-types-previewrenderer@13.4).

This specifies the preview renderer only for records with the record type `myextension_bloglist`
as determined by the field `CType` of the table `tt_content`.

This could be used to preview the blog plugin in the page module.

```php
$GLOBALS['TCA']['tt_content']['types']['myextension_bloglist']['previewRenderer']
    = \MyVendor\MyExtension\Preview\PreviewRenderer::class;
```

### Example: Create the blog plugin at once {#example-create-the-blog-plugin-at-once}

Demonstrates property: [saveAndClose](https://docs.typo3.org/permalink/t3tca:confval-types-creationoptions-saveandclose@13.4).

When editors create a new blog plugin in the plugin is automatically saved and
the user returned to the page module:

**EXT:my_extension/Configuration/TCA/Overrides/tt_content.php**

```php
<?php

defined('TYPO3') or die();

$GLOBALS['TCA']['tt_content']['types']['myextension_bloglist']
  ['creationOptions']['saveAndClose'] = true;

```

> [!NOTE]
> This property only takes effect in the table `tt_content`.
