在我的自定义扩展中,我向需要读取的图像元数据引入了二进制变量,类似于"在列表视图中显示" of tx_news。
以tx_news为例,我可以添加变量,新的调色板显示后端的复选框,选择在sys_file_reference表的新数据库字段中注册...
我首先尝试在域中声明它,但是我无法使用变量,因为它是我尝试使用它的相同文件的数组,在循环中调用它打破了循环... (this was my question)
现在我需要在我的流体模板中使用这个新变量,如果我通过这些项循环,那么名为 opentab
的新变量是可见的,如果我像这样调试:
<f:for each="{object.items}" as="item" iteration="iteration">
<f:debug>{item.originalResource}</f:debug>
# debug result
TYPO3\CMS\Core\Resource\FileReferenceprototypeobject
propertiesOfFileReference => array(36 items)
uidOfFileReference => NULL
name => NULL
originalFile => TYPO3\CMS\Core\Resource\Fileprototypeobject
mergedProperties => array(empty)
propertiesOfFileReference
有&#34;标题&#34;我可以像这样使用 {item.originalResource.title}
在 propertiesOfFileReference
中,我看到&#34; opentab&#34;有正确的价值,但我发现无法使用它!!!
答案 0 :(得分:1)
使用{item.originalResource.properties.opentab}