1

我得到了这个条件:

[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   
            }
}

如何在 pidInList = get_carpid 行中的 SELECT 中使用定义的 get_carpid

谢谢你的帮助!

4

1 回答 1

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  ...

第一个解决方案更有趣,第二个对新手来说更容易 - 我猜 :)

于 2012-08-28T12:40:25.737 回答