fileFolderConfig

fileFolderConfig.folder
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(), possibly using the prefix “EXT:” to point to an extension folder.

Files from the folder is selected recursively to the level specified by fileFolder_recursions and only files of the extension defined by fileFolder_extList are selected.

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
'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,
                ],
            ],
        ],
    ],
]