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.
fileFolderConfig
fileFolderConfig[folder]
-
- Type
- string
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display / Proc.
- RenderType
- all
Specifying a folder from where files are added to the item array.
Specify the folder relative to the
\TYPO3\
. See getPublicPath() . Alternatively use the prefix "EXT:" to point to an extension folder.CMS\ Core\ Core\ Environment:: get Public Path () Files from the folder are selected recursively to the level specified by fileFolderConfig.depth and only files of the extensions defined by fileFolderConfig.allowedExtensions are listed in the select box.
Only the file reference relative to the "fileFolderConfig.folder" is stored.
If the files are images (gif,png,jpg) they will be configured as icons (third parameter in items array).
This configuration can be overridden by Page TSconfig.
fileFolderConfig[allowedExtensions]
-
- Type
- string
- Scope
- Display / Proc.
- RenderType
- all
List of file extensions to select. If blank, all files are selected. Specify list in lowercase.
This configuration can be overridden by Page TSconfig.
fileFolderConfig[depth]
-
- Type
- integer
- Scope
- Display / Proc.
- RenderType
- all
Depth of directory recursions. Default is 99. Specify in range from 0-99. 0 (zero) means no recursion into subdirectories. Only useful in combination with property fileFolderConfig.folder.
This configuration can be overridden by Page TSconfig.
Examples
Select SVGs recursively from a folder
[
'columns' => [
'select_single_7' => [
'exclude' => 1,
'label' => 'select_single_7 fileFolder, dummy first entry, selectIcons',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
[
'',
0,
],
],
'fileFolderConfig' => [
'folder' => 'EXT:styleguide/Resources/Public/Icons',
'allowedExtensions' => 'svg',
'depth' => 1,
],
'fieldWizard' => [
'selectIcons' => [
'disabled' => false,
],
],
],
],
],
]