Reputation: 543
Inside a custom content element, I use two fields: image and media
My setup.txt looks like this:
custom_ce {
templateName = CustomCe
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = media
}
20 = Vendor\Ext\DataProcessing\CustomCeProcessor
}
}
Currently I managed to process only one field. Is it possible to pass both media and image fields to the filesProcessor ?
Upvotes: 2
Views: 718
Reputation: 7016
You can call a DataProcessor more than once and you can specify the varibale the files are available in your fluid template with the as
key:
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
}
}
Upvotes: 3