Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
appearance
appearance
-
- Path
-
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- type
-
array
- Scope
-
Display
- InternalType
-
all
Options for refining the appearance of group-type fields. This property is automatically used for FAL relations created by the function
Extension
.Management Utility:: get File Field TCAConfig - elementBrowserType (string)
- Allows to set an alternative element browser type (
db
orfile
) that would otherwise be rendered based on the internal_type setting. This is used internally for FAL file fields, where internal_type isdb
but the element browser should be the file element browser anyway. - elementBrowserAllowed (string)
- Makes it possible to set an alternative element browser allowed string
that would otherwise be taken from the allowed setting of this field.
This is used internally for FAL file fields, where
this is used to supply the comma list of allowed file types. This also
affects whether the "Add media by URL" button is shown if online media
file extensions (e.g.
youtube
orvimeo
) are included.
Examples
[
'columns' => [
'inline_1' => [
'exclude' => 1,
'label' => 'inline_1 typical fal image',
'config' => [
'type' => 'inline',
'foreign_table' => 'sys_file_reference',
'foreign_field' => 'uid_foreign',
'foreign_sortby' => 'sorting_foreign',
'foreign_table_field' => 'tablenames',
'foreign_match_fields' => [
'fieldname' => 'inline_1',
],
'foreign_label' => 'uid_local',
'foreign_selector' => 'uid_local',
'overrideChildTca' => [
'columns' => [
'uid_local' => [
'config' => [
'appearance' => [
'elementBrowserType' => 'file',
'elementBrowserAllowed' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg',
],
],
],
'crop' => [
'description' => 'field description',
],
],
'types' => [
2 => [
'showitem' => '
--palette--;;imageoverlayPalette,
--palette--;;filePalette',
],
],
],
'filter' => [
[
'userFunc' => 'TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren',
'parameters' => [
'allowedFileExtensions' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg',
'disallowedFileExtensions' => '',
],
],
],
'appearance' => [
'useSortable' => true,
'headerThumbnail' => [
'field' => 'uid_local',
'height' => '45m',
],
'enabledControls' => [
'info' => true,
'new' => false,
'dragdrop' => true,
'sort' => false,
'hide' => true,
'delete' => true,
],
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
],
],
],
],
]
Copied!
Where Extension
internally
creates an array like this:
$fileFieldTCAConfig = [
'type' => 'inline',
'foreign_table' => 'sys_file_reference',
'foreign_field' => 'uid_foreign',
'foreign_sortby' => 'sorting_foreign',
'foreign_table_field' => 'tablenames',
'foreign_match_fields' => [
'fieldname' => $fieldName
],
'foreign_label' => 'uid_local',
'foreign_selector' => 'uid_local',
'overrideChildTca' => [
'columns' => [
'uid_local' => [
'config' => [
'appearance' => [
'elementBrowserType' => 'file',
'elementBrowserAllowed' => $allowedFileExtensions
],
],
],
],
],
'filter' => [
[
'userFunc' => 'TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren',
'parameters' => [
'allowedFileExtensions' => $allowedFileExtensions,
'disallowedFileExtensions' => $disallowedFileExtensions
]
]
],
'appearance' => [
'useSortable' => true,
'headerThumbnail' => [
'field' => 'uid_local',
'width' => '45',
'height' => '45c',
],
'showPossibleLocalizationRecords' => false,
'showSynchronizationLink' => false,
'showAllLocalizationLink' => false,
'enabledControls' => [
'info' => false,
'new' => false,
'dragdrop' => true,
'sort' => false,
'hide' => true,
'delete' => true,
'localize' => true,
],
],
];
Copied!