Outdated TYPO3 Version
This documentation refers to an outdated TYPO3 version - either select a supported version or make sure to use a TYPO3 Extended Long Term Support (ELTS) version to continue getting security updates.
If editing records in the backend, all fields are usually displayed after each other in single rows. Palettes provide a way to display multiple fields next to each other if the browser window size allows this. They can be used to group multiple related fields in one combined section.
Each palette has a name and can be referenced by name from within the [‘types’] section.
TCA of table
pages specifies a series of palettes, let’s have a closer look at one of them:
'palettes' => [ 'caching' => [ 'showitem' => ' cache_timeout;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.cache_timeout_formlabel, cache_tags, no_cache;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.no_cache_formlabel ', ], ... ],
This specifies the palette
caching. It is then referenced in the
types section for “normal” tables on tab “Behaviour”:
'types' => [ '1' => [ 'showitem' => ' ... --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.behaviour, ... --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.caching;caching, ... ... ', ], ... ],
- string (list of field names)
Specifies which fields are displayed in which order in the palette, examples:
'showitem' => 'aFieldName, anotherFieldName', 'showitem' => 'aFieldName;labelOverride, anotherFieldName', 'showitem' => 'aFieldName, anotherFieldName, --linebreak--, yetAnotherFieldName',
Instead of a field name, the special keyword
--linebreak--can be used to place groups of fields on single lines. Note this line grouping only works well if the browser window size allows multiple fields next to each other, if the width is not sufficient the fields will wrap below each other anyways.
A field name must only appear once in the entire record. Do not reference a single field within the showitem list of a types section and again in a palette used in the same type. Don’t use a field in multiple palettes referenced in a type, or multiple times in one palette.