You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TYPO3自定义扩展:所选文件夹文件无法读取问题求助

TYPO3自定义扩展Flexform文件夹选择字段无法显示文件夹内文件排查

我在自定义TYPO3扩展中通过Flexform创建了文件夹选择字段,但无法展示该文件夹内的所有文件。以下是相关代码,恳请协助排查解决。

Flexform字段配置

<settings.path>
    <TCEforms>
        <label>LLL:EXT:file_list/Resources/Private/Language/locallang_flexform.xlf:filelist.path</label>
        <config>
            <type>input</type>
            <renderType>inputLink</renderType>
            <size>48</size>
            <eval>trim</eval>
            <fieldControl>
                <linkPopup>
                    <options>
                        <blindLinkOptions>page,url,mail,spec,file,telephone</blindLinkOptions>
                        <blindLinkFields>class,target,title,params</blindLinkFields>
                    </options>
                </linkPopup>
            </fieldControl>
        </config>
    </TCEforms>
</settings.path>

setup.typoscript

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:spt_gallerymanagement/Configuration/TypoScript/DataProcessors/Processors/FilesProcessor.typoscript">
plugin.tx_sptgallerymanagement_sptgallerymanagement {
    view {
        templateRootPaths.0 = EXT:spt_gallerymanagement/Resources/Private/Templates/
        templateRootPaths.1 = {$plugin.tx_sptgallerymanagement_sptgallerymanagement.view.templateRootPath}
        partialRootPaths.0 = EXT:spt_gallerymanagement/Resources/Private/Partials/
        partialRootPaths.1 = {$plugin.tx_sptgallerymanagement_sptgallerymanagement.view.partialRootPath}
        layoutRootPaths.0 = EXT:spt_gallerymanagement/Resources/Private/Layouts/
        layoutRootPaths.1 = {$plugin.tx_sptgallerymanagement_sptgallerymanagement.view.layoutRootPath}
    }
    persistence {
        storagePid = {$plugin.tx_sptgallerymanagement_sptgallerymanagement.persistence.storagePid}
        #recursive = 1
    }
    features {
        #skipDefaultArguments = 1
        # if set to 1, the enable fields are ignored in BE context
        ignoreAllEnableFieldsInBe = 0
    }
    mvc {
        #callDefaultActionIfActionCantBeResolved = 1
    }
}
# these classes are only used in auto-generated templates
plugin.tx_sptgallerymanagement._CSS_DEFAULT_STYLE (
    textarea.f3-form-error {
        background-color:#FF9F9F;
        border: 1px #FF0000 solid;
    }
    input.f3-form-error {
        background-color:#FF9F9F;
        border: 1px #FF0000 solid;
    }
    .tx-spt-gallerymanagement table {
        border-collapse:separate;
        border-spacing:10px;
    }
    .tx-spt-gallerymanagement table th {
        font-weight:bold;
    }
    .tx-spt-gallerymanagement table td {
        vertical-align:top;
    }
    .typo3-messages .message-error {
        color:red;
    }
    .typo3-messages .message-ok {
        color:green;
    }
)

FilesProcessor.typoscript

tt_content {
   examples_dataprocfiles =< lib.contentElement
   examples_dataprocfiles {
      templateName = Galleryview
      dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
      dataProcessing.10  {
         folders.data = settings.path
         sorting = title
         as = FileList
      }
   }
}

相关界面截图

  • 文件夹选择字段界面:文件夹选择字段界面
  • 扩展配置界面:扩展配置界面

内容的提问来源于stack exchange,提问作者Amrutha Lakshmi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 15:50:36