columnsOverrides

columnsOverrides
Path

$GLOBALS['TCA'][$table]['types'][$type]

type

array (columns fields overrides)

Scope

Display

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

This allows to change the column definition of a field if a record of this type is edited. Currently, it only affects the display of form fields, but not the data handling.

A typical property that can be changed here is renderType.

The core uses this property to override for instance 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.

Examples

Example adding "nowrap" to a text type for type "text":

'types' => [
   'text' => [
      'showitem' => 'hidden, myText',
      'columnsOverrides' => [
         'myText' => [
            'config' => [
               'wrap' => 'off',
            ],
         ],
      ],
   ],
   ...
],
Copied!