我遇到TYPO3的问题,我现在遇到过几次。
如果我使用TYPO3 CONTENT对象获取对象,我可以使用renderObj渲染字段... 到目前为止一切都很好......
但是,如果我尝试获取一个我已经获取的对象,之前我没有得到任何响应..
以下设置:
temp.current = COA
temp.current {
10 = CONTENT
10 {
table = pages
select {
pidInList = 22
max = 1
}
renderObj = COA
renderObj {
10 = CONTENT
10 {
table = tt_content
select {
pidInList.field = uid
where = colPos = 9
max = 1
languageField = sys_language_uid
}
renderObj = COA
renderObj {
5 = TEXT
5 {
value = here
typolink {
parameter.field = pid
title {
cObject = RECORDS
cObject {
tables = pages
source.field = pid
conf.pages = TEXT
conf.pages.field = title
}
}
}
}
20 = IMAGE
20 {
required = 1
file{
import = uploads/pics/
import.field = image
import.data = levelmedia: -1, slide
import.listNum = 0
width = 300c
height = 300c
}
titleText.field = titleText // altText
altText.field = altText // titleText
imageLinkWrap = 1
imageLinkWrap {
enable = 1
typolink {
parameter.data = field:pid
}
}
}
}
}
}
}
}
这是我目前的设置,我需要获得一个当前的项目......无论如何..
重要的部分是:
5 = TEXT
5 {
value = here
typolink {
parameter.field = pid
title {
cObject = RECORDS
cObject {
tables = pages
source.field = pid
conf.pages = TEXT
conf.pages.field = title
}
}
}
}
我已经调试了源的结果......值是92,这是我需要标题字段的页面中正确的uid ...
我也知道代码应该没问题,因为我在很多页面上都使用了这个代码段。
我认为问题是,我尝试获取之前已经提取过的内容..
就在这里:
temp.current = COA
temp.current {
10 = CONTENT
10 {
table = pages
select {
pidInList = 22
max = 1
}
}
}
非常感谢!
//编辑
我为我的问题找到了一个非常好的解决方案..
5 = TEXT
5 {
value = hier
typolink {
parameter.field = pid
title.cObject = TEXT
title.cObject {
data.dataWrap = DB:pages:{field:pid}:title
}
}
}
答案 0 :(得分:4)
我找到了解决方案!
5 = TEXT
5 {
value = hier
typolink {
parameter.field = pid
title.cObject = TEXT
title.cObject {
data.dataWrap = DB:pages:{field:pid}:title
}
}
}
答案 1 :(得分:1)
根据http://forge.typo3.org/issues/20541你是对的,这不是一个错误,而是一个功能(“递归预防”)。