Folder
New in version 13.0
When using the folder
type, TYPO3 takes care of
generating the according database field.
A developer does not need to define this field in an extension's
ext_
file.
The TCA type folder
creates a field where folders can be attached to
the record. The values are stored as a combined identifier in a
comma-separated list (csv).
The according database field
is generated automatically.
Table of contents
Examples
'columns' => [
'aColumn' => [
'config' => [
'type' => 'folder',
],
],
],
Properties of the TCA column type folder
behaviour
-
allowLanguageSynchronization
-
- Type
- boolean
- Default
- false
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['behaviour']['allowLanguageSynchronization']
- Scope
- Proc.
Allows an editor to select in a localized record whether the value is copied over from default or source language record, or if the field has an own value in the localization. If set to true and if the table supports localization and if a localized record is edited, this setting enables FieldWizard LocalizationStateSelector: Two or three radio buttons shown below the field input. The state of this is stored in a json encoded array in the database table called
l10n_
. It tells the DataHandler which fields of the localization records should be kept in sync if the underlying default or source record changes.state
autoSizeMax
-
- Type
- integer
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display
The maximum size (height) of the select field.
The size of the select field will be automatically adjusted based on the number of selected items. The select field will never be smaller than the specified size and never larger than the value of
auto
.Size Max Note
Only has an effect if maxitems is greater than 1.
elementBrowserEntryPoints
-
- Type
- array
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display
By default, the last folder is used when opening the element browser. Setting this configuration value changes this behaviour.
This configuration value contains an array. For the column type folder only the value with the key
_default
is used.When opening the element browser the folder with the
_default
key is preselected.
You can also define an entry point with the _default
key:
'folder_group' => [
'label' => 'Folder field',
'config' => [
'type' => 'folder',
'elementBrowserEntryPoints' => [
'_default' => '1:/styleguide/'
]
]
],
It is also possible to use a special TSconfig key:
'folder_group' => [
'label' => 'Folder field',
'config' => [
'type' => 'folder',
'elementBrowserEntryPoints' => [
'_default' => '###PAGE_TSCONFIG_ID###'
]
]
],
This key has then to be defined on field level:
TCEFORM.my_table.folder_group.PAGE_TSCONFIG_ID = 1:/styleguide/subfolder
In case an allowed table has no entry point defined, the _default
is used.
In case _default
is also not set or element
is not
used at all, the previous behaviour applies.
fieldControl
-
The field of type folder can enable all common field control options. Furthermore the following are available:
elementBrowser
-
- Type
- array
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldControl']
- Scope
- fieldControl
The element browser field control used in
type='folder'
renders a button to open an element browser to choose a folder.It is enabled by default if rendering a folder element.
fieldInformation
-
For details see fieldInformation.
fieldWizard
-
defaultLanguageDifferences
-
- Type
- array
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['defaultLanguageDifferences']
For details see defaultLanguageDifferences.
localizationStateSelector
-
- Type
- array
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['localizationStateSelector']
For details see localizationStateSelector.
otherLanguageContent
-
- Type
- array
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['otherLanguageContent']
For details see otherLanguageContent.
hideDeleteIcon
-
- Type
- boolean
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display
Removes the delete icon next to the selector box.
hideMoveIcons
-
- Type
- boolean
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display
Removes the move icons next to the selector box.
maxitems
-
- Type
- integer > 0
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display / Proc.
Maximum number of child items. Defaults to a high value. JavaScript record validation prevents the record from being saved if the limit is not satisfied.
minitems
-
- Type
- integer > 0
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display
Minimum number of child items. Defaults to 0. JavaScript record validation prevents the record from being saved if the limit is not satisfied.
multiple
-
- Type
- boolean
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display / Proc.
Allows the same item more than once in a list.
readOnly
-
- Type
- boolean
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['readOnly']
- Scope
- Display
Renders the field in a way that the user can see the value but cannot edit it.
Warning
This property affects only the display. It is still possible to write to those fields when using the DataHandler.
size
-
- Type
- integer
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display
The minimum size (height) of the select field.
The size of the select field will be automatically adjusted based on the number of selected items. The select field will never be smaller than the specified
size
and never larger than the value of autoSizeMax.