【发布时间】:2020-01-15 16:49:24
【问题描述】:
官方 TYPO3 文档解释了如何创建(或复制)和使用 lib.dynamicContent 将列呈现为 Fluidtemplate。
我不明白这个例子中到底发生了什么。
TypoScript 有:
lib.dynamicContent = COA
lib.dynamicContent {
10 = LOAD_REGISTER
10.colPos.cObject = TEXT
10.colPos.cObject {
field = colPos
ifEmpty.cObject = TEXT
ifEmpty.cObject {
value.current = 1
ifEmpty = 0
}
}
20 = CONTENT
20 {
table = tt_content
select {
orderBy = sorting
where = colPos={register:colPos}
where.insertData = 1
}
}
90 = RESTORE_REGISTER
}
我在大量的 TYPO3 项目中使用了这个 sn-p,并且经常问自己那里发生了什么。
我通过一些试验改变了这一点,并以:
lib {
dynamicContent = COA
dynamicContent {
10 = CONTENT
10 {
table = tt_content
select {
orderBy = sorting
where {
data = field:colPos
wrap = colPos=|
}
}
}
}
}
这似乎在做“完全相同”的事情——它在通过 cObject ViewHelper 调用时输出我的内容。
有人可以解释这是否或为什么这是呈现内容的更糟糕的方式吗?
这是lib.dynamicContent-doc 的链接:https://docs.typo3.org/c/typo3/cms-fluid-styled-content/master/en-us/Installation/InsertingContentPageTemplate/Index.html#based-on-the-fluidtemplate-content-object-cobj
【问题讨论】:
标签: typo3 typoscript