经过长时间的Google搜索,我终于能够获取Typo3 7.6 Fluid中FAL Objects的类别。但我只能返回一个字符串,我希望能够获得像{data}这样的对象。
我的做法: TypoScript
lib.category = CONTENT
lib.category {
table=sys_category
wrap=|
select {
pidInList = root,0,1
recursive = 99
max=10
selectFields=sys_category.title,sys_category.uid
join = sys_category_record_mm on sys_category_record_mm.uid_local = sys_category.uid join sys_file_metadata on sys_file_metadata.uid = sys_category_record_mm.uid_foreign join sys_file_reference on sys_file_reference.uid_local = sys_file_metadata.file
where.field = fuid
where.wrap = sys_file_reference.uid=|
}
renderObj=COA
renderObj {
1=TEXT
1.field = uid
2=TEXT
2.field = title
}
}
在 Fluid 中,我有:
<f:for each="{files}" as="file">
<p>
- {file.uid}<br />
- <f:cObject typoscriptObjectPath="lib.category" data="{fuid:file.uid}" />
</p>
</f:for>
在网页上,它打印出以下内容:
- 88
3Black7Small
89
2Blue7Big
90
- 1Red
有人能帮帮我吗?
files
变量来自哪里?您是使用fluid_styled_content还是较旧的css_styled_content? - Dimitri L.