我想通过TypoScript阅读内容并通过自定义流体模板进行渲染。没有css_styled_content或fluid_styled_content。
next()
这适用于字符串,比如说
temp.test = CONTENT
temp.test {
table = tt_content
select.languageField = 1
select.selectFields = bodytext,image,header,header_link
select.where = colPos = 1
renderObj = FLUIDTEMPLATE
renderObj {
file = path/to/Teaser.html
}
}
但不是
<f:debug>{data.header}</f:debug>
仅返回图像数量。
现在,在经典的TypoScript RenderObj(也许是COA)中,您可能会添加类似
的内容<f:debug>{data.image}</f:debug>
虽然如今,我们希望在Fluid模板中实现这一目标。但是如何解析FAL图像以将其传递给流体模板?
答案 0 :(得分:3)
您应该能够使用TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
数据处理器为您提取文件数据,以便您可以在模板中使用{files}
访问它。
renderObj = FLUIDTEMPLATE
renderObj {
file = path/to/Teaser.html
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10.references.fieldName = image
}
}
答案 1 :(得分:1)