问题描述
我正在尝试将内容元素作为 f:cObject 加载,如下所示:
<f:cObject typoscriptObjectPath="lib.supplier" data="{supplier:supplier.uid,supplier_content:'supplier_booking_page'}" />
如您所见,数据属性有两个变量:supplier
和 supplier_content
。
然后我使用这个打字稿来声明 lib.supplier
:
lib.supplier = CONTENT
lib.supplier {
table = tt_content
select {
pidInList = 272
orderBy = sorting
where {
field = supplier
wrap = supplier = |
}
}
}
哪个工作正常,但我需要 where 子句中的两个变量。
这个:
lib.supplier = CONTENT
lib.supplier {
table = tt_content
select {
pidInList = 272
orderBy = sorting
where {
field = supplier_content
wrap = supplier_content = '|'
}
}
}
也很好用。
但是我如何结合两个 where 子句?
我找到了一个可行的解决方案,但这对于一个 - 在我看来 - 非常简单的 where 子句来说似乎太复杂了:
lib.supplier = COA
lib.supplier {
10 = LOAD_REGISTER
10 {
supplier.cObject = TEXT
supplier.cObject {
field = supplier
ifEmpty.data = ''
}
supplier_content.cObject = TEXT
supplier_content.cObject {
field = supplier_content
ifEmpty.data = ''
}
}
20 = CONTENT
20 {
table = tt_content
select {
pidInList = 272
orderBy = sorting
where = {#supplier} = {register:supplier} AND {#supplier_content} = '{register:supplier_content}'
where.insertData = 1
}
}
30 = RESTORE_REGISTER
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)