是否可以使用Fluid呈现一个页面的内容(假设有多篇image+text文章)?我希望对html有更多的控制(这是一个有效的理由吗?)。我试图通过TypoScript获取一些我认为可能是一些对象(行)的数组,但当分配给变量并在fluid中使用时:因为它会导致字符串,从而导致类型错误,所以这不起作用:
arr = COA
arr.10 = CONTENT
arr.10 {
table = tt_content
select {
languageField=sys_language_uid
where = colNum = 1
}
}
<f:for each="{arr}" as="article" iteration="itemIteration">
abcd
</f:for>
发布于 2013-11-20 06:58:20
您不能开箱即用地这样做。但是扩展"vhs“使您能够做到这一点,看一下RenderViewHelper。
这将获取第5页colPos 0上的前10个内容,并将它们存储在变量contentElements中。然后遍历content对象:
<v:content.render column="0" limit="10" pageUid="5" as="contentElements">
<f:for each="{contentElements}" as="contentElement">
<f:format.html>{contentElement.bodytext}</f:format.html>
</f:for>
</v:content.render>
发布于 2018-08-07 04:05:15
需要将render=设置为“false”!那么它甚至可以与html格式一起工作。
<v:content.render column="0" pageUid="5" render="false" as="listItem">
<f:for each="{listItem}" as="contentElement">
<f:format.html>{contentElement.bodytext}</f:format.html>
</f:for>
</v:content.render>
https://stackoverflow.com/questions/20083143
复制相似问题