If statement 第二个ifEmpty条件
我尝试为当前页面创建第二个回退选项。 如果我的列为空,则我当前的函数获取父页面的内容。但是,如果我的回退也是空的,我也需要一个选项。 如果我的回退也应该是空的,那么它应该进入下一个级别(leveluid:-3) 有没有解决打字稿问题的方法If statement 第二个ifEmpty条件,if-statement,typo3,typoscript,typo3-6.2.x,If Statement,Typo3,Typoscript,Typo3 6.2.x,我尝试为当前页面创建第二个回退选项。 如果我的列为空,则我当前的函数获取父页面的内容。但是,如果我的回退也是空的,我也需要一个选项。 如果我的回退也应该是空的,那么它应该进入下一个级别(leveluid:-3) 有没有解决打字稿问题的方法 variables.element = CONTENT variables.element { table = tt_content select { pidInList.data = page:uid orderBy = sortin
variables.element = CONTENT
variables.element {
table = tt_content
select {
pidInList.data = page:uid
orderBy = sorting
where = colPos=3
}
# Fallback
stdWrap.ifEmpty.cObject = CONTENT
stdWrap.ifEmpty.cObject {
table = tt_content
select {
pidInList.data = leveluid:-2
orderBy = sorting
where = colPos=3
}
}
# Fallback 2
stdWrap.ifEmpty.cObject = CONTENT
stdWrap.ifEmpty.cObject {
table = tt_content
select {
pidInList.data = leveluid:-3
orderBy = sorting
where = colPos=3
}
}
}
你为什么这么复杂 使用CSC或FSC定义
style.content.get
从主列(colPos=0)收集内容记录
这很容易增强到其他专栏,并且有一种简单的机制可以从上面的页面收集内容:幻灯片
(请参阅内容文档)
variables.element
variables.element < styles.content.get
variables.element.select.where = colPos = 3
variables.element.slide = -1