[英]TYPO3 - parent page field for title in typolink
I have a problem with TYPO3 which I encountered several times now. 我现在遇到过几次TYPO3的问题。
If i fetch an object with the TYPO3 CONTENT Object i have the possibility to render the fields with the renderObj... So far so good... 如果我使用TYPO3 CONTENT Object获取对象,则可以使用renderObj渲染字段。
But if i try to fetch an object which i fetched already before i dont get any response.. 但是,如果我尝试获取在没有任何响应之前已经获取的对象。
Following setup: 设置如下:
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
}
}
}
}
}
}
}
}
This is my current setup which i need to get a current project... Whatever.. 这是我当前的设置,我需要获取当前的项目...
The important part is: 重要的部分是:
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
}
}
}
}
I've already debugged the result of source... The value is 92, which is the correct uid from the page from where I need the title field... 我已经调试了source的结果...值是92,这是我需要标题字段的页面中的正确uid。
Also I know that the code should be okay, because I use this snippet on many pages. 我也知道代码应该没问题,因为我在许多页面上都使用了此代码段。
I think the problem is, that I try to fetch a content which i already fetched before.. 我认为问题是,我尝试获取以前已经获取的内容。
Right here: 就在这儿:
temp.current = COA
temp.current {
10 = CONTENT
10 {
table = pages
select {
pidInList = 22
max = 1
}
}
}
Many thanks! 非常感谢!
// EDIT //编辑
I found a very good solution for my problem.. 我为我的问题找到了很好的解决方案。
5 = TEXT
5 {
value = hier
typolink {
parameter.field = pid
title.cObject = TEXT
title.cObject {
data.dataWrap = DB:pages:{field:pid}:title
}
}
}
I found a solution! 我找到了解决方案!
5 = TEXT
5 {
value = hier
typolink {
parameter.field = pid
title.cObject = TEXT
title.cObject {
data.dataWrap = DB:pages:{field:pid}:title
}
}
}
根据http://forge.typo3.org/issues/20541的说法,您是对的,这不是错误,而是功能(“递归预防”)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.