Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
If statement 第二个ifEmpty条件_If Statement_Typo3_Typoscript_Typo3 6.2.x - Fatal编程技术网

If statement 第二个ifEmpty条件

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

我尝试为当前页面创建第二个回退选项。 如果我的列为空,则我当前的函数获取父页面的内容。但是,如果我的回退也是空的,我也需要一个选项。 如果我的回退也应该是空的,那么它应该进入下一个级别(leveluid:-3)

有没有解决打字稿问题的方法

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