[英]FilesProcessor and viewhelper f:uri.image
I added to a Fluidtemplate cObject a FilesProcessor: 我向Fluidtemplate cObject添加了一个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.
当我用d:debug调试时,我得到foreach文件,与没有filed.0一样,输出的文件完全相同。
Thanks! 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.