我對Typo3/TypoScript非常陌生,我想知道是否以及如何將TypoScript中的sql語句的結果提供給php函數。TypoScript中的SQL與Userfunc的結果
我已經管理了userFunc到目前爲止,但我對其餘的感到困惑。 這裏是我的嘗試:
temp.pidList = CONTENT
temp.pidList {
table = tx_eepcollect_sessions
#table = tt_content
select {
pidInList < plugin.tx_eepcollect_pi1.pid_list
where {
stdWrap.cObject = TEXT
stdWrap.cObject {
data = global : _COOKIE | tx_eepcollect_pi1
wrap = ses_id='|'
}
}
}
renderObj = COA
renderObj {
10 = TEXT
10.field = ses_data
#30 = TEXT
#30.data = debug:data
}
}
includeLibs.user_idList = fileadmin/services/user_IdList.php
temp.ListOfIds = USER
temp.ListOfIds.userFunc = user_IdList->get_IdList
#temp.pidList = TEXT
#temp.pidList = {"1275":{"id":"1275","tx_eepcollect_pi1":{"prozess":"add","pid":"1275","ctrl":"1360858765"},"cHash":"e90b62584f3f0e4f71bf1100faf39d83"}}
temp.ListOfIds.userFunc.jsonList < temp.pidList
temp.mainContent = COA_INT
temp.mainContent.10 = TEXT
temp.mainContent.10.stdWrap.cObject < temp.ListOfIds
輸出是很多東西的數組,而不是數據庫查詢的結果。
究竟是什麼需要的? temp.pidList或temp.ListOfIds的輸出? 如果你問的是userfunc,那麼請複製粘貼php代碼。 – 2013-02-15 16:48:21