TYPO3:fieldName的多个引用?

时间:2017-03-08 10:08:13

标签: typo3 typoscript fluid extbase

在自定义内容元素中,我使用两个字段:图像和媒体

我的setup.txt看起来像这样:

custom_ce {
        templateName = CustomCe
        dataProcessing {
            10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
            10 {
                references.fieldName = media
            }
            20 = Vendor\Ext\DataProcessing\CustomCeProcessor
        }
    }

目前我设法只处理一个字段。是否可以将两个媒体和图像字段传递给filesProcessor?

1 个答案:

答案 0 :(得分:2)

您可以多次调用DataProcessor,并且可以使用as键指定流体模板中文件可用的varibale:

custom_ce {
    templateName = CustomCe
    dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
        10 {
            references.fieldName = media
            as = media
        }
        15 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
        15 {
            references.fieldName = image
            as = image
        }
        20 = Vendor\Ext\DataProcessing\CustomCeProcessor
    }
}