I added to a Fluidtemplate cObject a FilesProcessor:
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10.references.fieldName = media
}
in my fluid template i get the correct files object:
0 => TYPO3\CMS\Core\Resource\FileReferenceprototypeobject
1 => TYPO3\CMS\Core\Resource\FileReferenceprototypeobject
This works:
<f:for each="{files}" as="file" iteration="i">
<img src="{f:uri.image(image: file, width: '967c', height: '967c')}" alt="">
</f:for>
but this throws an exception:
<img src="{f:uri.image(image: files.0, width: '967c', height: '967c')}" alt="">
Does anyone know why? When i debug it with d:debug i get for file the foreach exact the same output like files.0 without foreach.
Thanks!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.