TYPO3 onepager all将所有页面渲染为一个页面不工作
我想将所有页面呈现到模板中,以制作一个onepager 我试试这个:TYPO3 onepager all将所有页面渲染为一个页面不工作,typo3,typoscript,typo3-7.6.x,Typo3,Typoscript,Typo3 7.6.x,我想将所有页面呈现到模板中,以制作一个onepager 我试试这个: 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
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
page.20=模板
page.20.template=文件
page.20.template.file=fileadmin/design/index.html
第20.20页标记{
lib.sectionContent=humenu
lib.sectionContent{
1=t菜单
1 {
否=1
没有{
doNotLinkIt=1
stdWrap>
stdWrap{
cObject=COA
科宾特{
if.value=4
if.equals.field=doktype
if.negate=1
10<温度标题部分ID
10.1
20=内容
20 {
表=tt_含量
挑选{
pidInList.field=uid
}
包裹=|
renderObj
在模板文件中,我有一个部分####CONTENT###
我希望所有内容都打印在那里。这怎么可能呢?您有一个嵌套错误 您的嵌套当前如下所示(使用对象浏览器验证): 但是,
页面上的模板
对象只检查中的键标记.*
并在那里需要一个有效的内容对象(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
}
#为内容准备配置
lib.sectionContent=humenu
lib.sectionContent{
1=t菜单
1 {
否=1
没有{
doNotLinkIt=1
stdWrap>
stdWrap{
cObject=COA
科宾特{
if.value=4
if.equals.field=doktype
if.negate=1
10<温度标题部分ID
10.1
20=内容
20 {
表=tt_含量
挑选{
pidInList.field=uid
}
包裹=|
renderObj
您有一个嵌套错误
您的嵌套当前如下所示(使用对象浏览器验证):
但是,页面上的模板
对象只检查中的键标记.*
并在那里需要一个有效的内容对象(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
}
#为内容准备配置
lib.sectionContent=humenu
lib.sectionContent{
1=t菜单
1 {
否=1
没有{
doNotLinkIt=1
stdWrap>
stdWrap{
cObject=COA
科宾特{
if.value=4
if.equals.field=doktype
if.negate=1
10<温度标题部分ID
10.1
20=内容
20 {
表=tt_含量
挑选{
pidInList.field=uid
}
包裹=|
renderObj
该死的…一个愚蠢的错误。谢谢。这解决了问题该死的…一个愚蠢的错误。谢谢。这解决了问题