TYPO3 - 在typolink中为标题添加父页面字段

3
我遇到了几次TYPO3的问题,涉及IT技术方面。如果我使用TYPO3 CONTENT Object获取对象,它可以呈现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
        }
    }
}
2个回答

4
我找到了一个解决方案!
5 = TEXT
5 {
    value = hier
    typolink {
        parameter.field = pid
        title.cObject = TEXT
        title.cObject {
            data.dataWrap = DB:pages:{field:pid}:title
        }
    }
}

1

非常感谢您投入时间。这是一个糟糕的功能:P - Chris

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接