Typo3:使用错别字显示第一个子页面的内容

标签 typo3 typoscript

这就是我想要做的:在给定的页面上,我想显示给定页面的第一个子页面的所有内容元素。我不能简单地使用快捷方式页面,因为我需要在子页面的内容元素之后显示其他内容元素。我怎样才能做到这一点?

这是我认为我可以如何做到的一个片段,但我不知道如何构建选择。有没有更好的办法?

# save current content
tmp.pagecontent < page.10.subparts.main-content

# clear the content of the main column
page.10.subparts.main-content >

# build a new object for this column as content-object-array
page.10.subparts.main-content = COA
page.10.subparts.main-content {
  10 = CONTENT
  10.table = tt_content
  10.select {
    # what should I put here?
  }
# re-insert the normal pagecontent to the page  
20 < tmp.pagecontent

最佳答案

只需为其他人添加答案。 First : 指定当前页面的第一个子页面。 第二:获取该子页面所需的内容元素。

temp.content = COA
temp.content {
  10 = CONTENT
  10 {
    table = pages
    select {
      pidInList.field = uid
      orderBy = sorting ASC
      max = 1
      begin = 0
    }
    renderObj = COA
    renderObj {
      10 = CONTENT
      10 {
        table = tt_content
        select {
          languageField = sys_language_uid
          pidInList.field = uid
          orderBy = sorting
          #where = colPos = 10
        }
        stdWrap.wrap = |
      }
    }
  }
}

关于Typo3:使用错别字显示第一个子页面的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6233393/

相关文章:

php - extbase (TYPO3) 中的 setOrderings 用于数组的第二层

typo3 - 在后端获取页眉和页脚预览

authentication - Typo3 版本 8 登录循环

typo3 - 使用 TYPO3 中的数据处理器 8

typo3 - 如何使用语言的多树概念设置 TYPO3 9.5.x

TYPO3 Extbase : How to get disabled related Object, 没有原始 sql 查询?

documentation - 如何向 TYPO3 扩展添加文档

typo3 - 通过 TypoScript 生成随机字符串

typo3 - 防止渲染 FCE 的 TYPO3 默认标题