TYPO3 onepager 全部将所有页面渲染成一个页面不起作用

TYPO3 onepager all render all pages into one is not working

我想将所有页面渲染到模板中以制作一个单页纸

我试试这个:

page.20 = TEMPLATE
page.20.template = FILE
page.20.template.file = fileadmin/design/index.html
page.20.marks{

lib.sectionContent = HMENU
lib.sectionContent {
  1 = TMENU
  1 {
    NO = 1
    NO {
      doNotLinkIt = 1
      stdWrap >
      stdWrap {
        cObject = COA
        cObject {
          if.value = 4
          if.equals.field = doktype
          if.negate = 1
          10 < temp.titleSectionId
          10.wrap = <section id="|">
          20 = CONTENT
          20 {
            table = tt_content
            select {
              pidInList.field = uid
            }
            wrap = <div class="container">|</div>
            renderObj < tt_content
          }
          30 = TEXT
          30 {
            wrap = </section>
          }
        }
      }
    }
  }
}    
    LANGMENU < temp.langMenu 

在模板文件中我有一个部分 ###CONTENT###

而且我希望所有内容都打印在那里。怎么可能?

你有一个嵌套错误。

您的嵌套当前看起来像这样(使用对象浏览器验证):

page.20.marks.lib.sectionContent ...

然而,page.20 处的 TEMPLATE 对象仅检查 .marks.* 中的键,并期望那里有一个有效的内容对象 (cObject) 配置。然而,有效密钥 lib 没有 cObject 集。

你真正想做的是:

# prepare configuration for content
lib.sectionContent = HMENU
lib.sectionContent {
  1 = TMENU
  1 {
    NO = 1
    NO {
      doNotLinkIt = 1
      stdWrap >
      stdWrap {
        cObject = COA
        cObject {
          if.value = 4
          if.equals.field = doktype
          if.negate = 1
          10 < temp.titleSectionId
          10.wrap = <section id="|">
          20 = CONTENT
          20 {
            table = tt_content
            select {
              pidInList.field = uid
            }
            wrap = <div class="container">|</div>
            renderObj < tt_content
          }
          30 = TEXT
          30 {
            wrap = </section>
          }
        }
      }
    }
  }
} 

# initialize configuration for the default page object
page.20 = TEMPLATE
page.20.template = FILE
page.20.template.file = fileadmin/design/index.html
page.20.marks{
    # copy the configuration from above to the right place
    CONTENT < lib.sectionContent
    # I really hope that you prepared temp.langMenu beforehand
    LANGMENU < temp.langMenu 
# close block for page.20.marks
}