fileFolderConfig

fileFolderConfig.folder
Path

$GLOBALS['TCA'][$table]['columns'][$field]['config']

Type

string

Scope

Display / Proc.

RenderType

all

Specifying a folder from where files are added to the item array.

Specify the folder relative to the \TYPO3\CMS\Core\Core\Environment::getPublicPath(). See getPublicPath() . Alternatively use the prefix "EXT:" to point to an extension folder.

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

../../../../_images/SelectSingle7.png
EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php
'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,
                ],
            ],
        ],
    ],
]