我得到了这个条件:
[globalVar = TSFE:fe_user|sesData|get_car = Katowice]
get_carpid = TEXT
get_carpid.value = 27
[global]
这个选择:
plugin.Tx_Formhandler.settings.predef.formhandler-multistep-forms.markers.input_readonly_a_price = CONTENT
plugin.Tx_Formhandler.settings.predef.formhandler-multistep-forms.markers.input_readonly_a_price {
table = tx_pricelist_prices_full
select {
pidInList = 27
orderBy = uid
selectFields = uid, group_a_1_3
# possible conditions
where = ( tx_pricelist_prices_full.uid='1' AND hidden='0' AND deleted='0')
}
renderObj = COA
renderObj {
#value
1 = TEXT
1.insertData = 1
1.data = field:group_a_1_3
2 = TEXT
2.value = *
3 = TEXT
3.insertData = 1
3.data = TSFE:fe_user|sesData|finish_day
stdWrap.prioriCalc = 1
}
}
如何在SELECT中使用定义的get_carpid行pidInList = get_carpid
感谢您的帮助!
答案 0 :(得分:2)
您可以创建一个cObject CASE。但这只适用于[a-zA-z0-9 _-]
# TS Setup
... snip ...
pidInList.cObject = CASE
pidInList.cObject {
key.data = TSFE:fe_user|sesData|get_car
key.case = lower
default = TEXT
default.value = 0
# special chars are not allowed
katowice = TEXT
katowice.value = 27
}
... snip ...
另一种可能性是使用常数:
# TS Constants
[globalVar = TSFE:fe_user|sesData|get_car = Katowice]
get_carpid = 27
[globalVar = TSFE:fe_user|sesData|get_car = Lublin]
get_carpid = 28
[global]
# TS Setup
... snip ...
pidInList = {$get_carpid}
... snip ...
第一个解决方案是更多的TypoScript乐趣,新手更容易 - 我想:)