0

嗯……我的 TypoScript 技能似乎有点生疏了。

 lib.feld < styles.content.get
 lib.feld.select.orderBy = rand()
 lib.feld.select.select.where = colPos=11
 lib.feld.wrap = <div class="wrapper">|</div>

我想仅在styles.content.get为所述返回多个项目时添加包装器 div colPos

我尝试了以下两种变体:

lib.feld.wrap.if {
    isGreaterThan.numRows < styles.content.get
    isGreaterThan.numRows.select.where = colPos=11
    value = 1
}

lib.feld.wrap.if {
    isGreaterThan.numRows.table = tt_content
    isGreaterThan.numRows.select < styles.content.get.select
    isGreaterThan.numRows.select.where = colPos=11
    value = 1
}

stdWrap在 numRows 之前还有一个额外的。一切都返回 false,即使应该有多个结果。

怎么了?

4

1 回答 1

1

从打字稿定义我猜:

temp.feld < styles.content.get
temp.feld.select.where = colPos=11
temp.feld.select.orderBy = rand()
temp.feld.select.pidInList = 123

lib.feld < temp.feld
lib.feld.wrap = <div>|</div>
lib.feld.wrap.if {
    isGreaterThan.stdWrap.numRows < temp.feld
    value = 1
}

对于检查/调试,numRows您可以使用以下值:

lib.numRows = TEXT
lib.numRows.numRows < temp.feld
lib.numRows.wrap = numRows=[|]

您可以在流体中使用

{f:cObject(typoscriptObjectPath:'lib.numRows')}

或在打字稿本身中用于输出

page.3 < lib.numRows
于 2017-10-11T10:10:33.600 回答