Automatically added system fields to content types (tt_content) 

The following tabs / palettes are added automatically to the showitem property of table tt_content:

  • The General tab with the general palette at the very beginning
  • The Language tab with the language palette after custom fields
  • The Access tab with the hidden and access palettes
  • The Notes tab with the rowDescription field
The edit form of a conference teaser with its tabs

The tabs General, Language, Access, and Notes are added automatically.

See an extended content element with custom fields for an example.

In case one of those palettes has been changed to no longer include the corresponding system fields, those fields are added individually depending on their definition in the ctrl section.

By default, all custom fields - the ones still defined in showitem - are added after the general palette and are therefore added to the General tab, unless a custom tab (for example Plugin, or Categories) is defined in between. It's also possible to start with a custom tab by defining a --div-- as the first item in the showitem. In this case, the General tab will be omitted.

All those system fields, which are added based on the ctrl section are also automatically removed from any custom palette and from the customized type's showitem definition.

If the content element defines the Extended tab, it will be inserted at the end, including all fields added to the type via API methods, without specifying a position, via \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTcaTypes() . See an extended content element with custom fields for an example.

Examples for the showitems TCA section in content elements 

Basic custom content element with header and bodytext 

The content element "Call for papers" has a header and a text:

EXT:my_extension/Configuration/TCA/Overrides/610-tt_content-call_for_papers.php
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

// Add the content element to the "Type" dropdown, with the predefined
// fields on the "General" tab
ExtensionManagementUtility::addRecordType(
  [
    'label' => 'my_extension.db:tt_content.call_for_papers',
    'value' => 'myextension_callforpapers',
    'icon' => 'content-text',
    // In the "New content element" wizard, the overlay shows that a call
    // for papers has a deadline
    'iconOverlay' => 'overlay-endtime',
    'group' => 'conference',
  ],
  '--palette--;;headers, bodytext',
);
Copied!

The following tabs are shown, the header palette and bodytext field are shown on the tab General:

The edit form of a call for papers

The edit form of a call for papers

Extended content element with custom fields 

The content element "Conference teaser" has fields of its own and a tab of its own. ExtensionManagementUtility::addRecordType() adds the tab Extended at the end:

EXT:my_extension/Configuration/TCA/Overrides/615-tt_content-conference_teaser.php
<?php

use MyVendor\MyExtension\Preview\ConferenceTeaserPreviewRenderer;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

defined('TYPO3') or die();

// The fields of the teaser
ExtensionManagementUtility::addTCAcolumns('tt_content', [
  'tx_myextension_teaser_conference' => [
    'label' => 'my_extension.db:tt_content.tx_myextension_teaser_conference',
    'config' => [
      'type' => 'select',
      'renderType' => 'selectSingle',
      'foreign_table' => 'tx_myextension_conference',
      'foreign_table_where' => 'AND {#tx_myextension_conference}.{#sys_language_uid} IN (-1, 0)',
      'relationship' => 'manyToOne',
    ],
  ],
  'tx_myextension_teaser_link_text' => [
    'label' => 'my_extension.db:tt_content.tx_myextension_teaser_link_text',
    'config' => [
      'type' => 'input',
    ],
  ],
  'tx_myextension_teaser_note' => [
    'label' => 'my_extension.db:tt_content.tx_myextension_teaser_note',
    'config' => [
      'type' => 'input',
    ],
  ],
]);

// Add the content element to the "Type" dropdown, after the call for papers.
// Predefined and own fields on the "General" tab and a tab of its own.
// addRecordType() adds the "Extended" tab at the end.
ExtensionManagementUtility::addRecordType(
  [
    'label' => 'my_extension.db:tt_content.conference_teaser',
    'value' => 'myextension_conferenceteaser',
    'icon' => 'my-extension-conference-list',
    'group' => 'conference',
    'description' => 'my_extension.db:tt_content.conference_teaser.description',
  ],
  '
    --palette--;;headers,
    tx_myextension_teaser_conference,
    --div--;my_extension.db:tab.teaser,
      tx_myextension_teaser_link_text,
  ',
  [
    // The page module shows the teased conference
    'previewRenderer' => ConferenceTeaserPreviewRenderer::class,
  ],
  'after:myextension_callforpapers',
);

// Added without a position, so the field is shown on the "Extended" tab
ExtensionManagementUtility::addToAllTCAtypes(
  'tt_content',
  'tx_myextension_teaser_note',
  'myextension_conferenceteaser',
);
Copied!

The following tabs are shown:

The edit form of a conference teaser

The edit form of a conference teaser

Additional fields that are subsequently added to the end of the table using \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTcaTypes() will appear in the tab Extended.