Ila*_*Ila 1 templates typo3 typoscript
我有一个Typo3安装,有3个现有的布局选项.这些都是在page.ts文件中声明的,如下所示:
#normal layout:
[globalVar=TSFE:page|layout=0]
page.10.template.file = fileadmin/template/classic-page.html
page.includeCSS.screen = fileadmin/template/css/style.css
page.includeCSS.screen.media = screen
[global]
Run Code Online (Sandbox Code Playgroud)
它们都在page.ts文件中的这个列表中,如下所示:
TCEFORM.pages {
layout.altLabels.0 = Normal
layout.altLabels.1 = Startpage
layout.altLabels.2 = Landing page
}
Run Code Online (Sandbox Code Playgroud)
所有这些布局选项都显示在CMS中"编辑页面(X)">"外观"页面的可能布局选项的下拉列表中.便利!
现在我有一个闪亮的新模板,我想作为一个选项添加.我可以通过将此代码添加到page.ts来将其应用于特定的页面ID(例如,页面编号#563):
[globalVar = TSFE:id=563]
page.10.template.file = fileadmin/template/shinynewtemplate.html
[GLOBAL]
Run Code Online (Sandbox Code Playgroud)
但我似乎无法将其添加为下拉菜单中的新布局选项.我试过这个:
#shiny new layout:
[globalVar=TSFE:page|layout=3]
page.10.template.file = fileadmin/template/shinynewtemplate.html
page.includeCSS.screen = fileadmin/template/css/style.css
page.includeCSS.screen.media = screen
[global]
TCEFORM.pages {
layout.altLabels.0 = Normal
layout.altLabels.1 = Startpage
layout.altLabels.2 = Landing page
layout.altLabels.3 = Shiny new page
}
Run Code Online (Sandbox Code Playgroud)
但没有香蕉.它没有显示在外观布局列表中,因此我无法将其应用于页面.
我错过了什么?是否还有其他地方需要声明此模板文件,以便它在下拉列表中显示为一个选项?
如果没有可以使用您标签的商品,则替代标签无效.
您需要添加新项目(Page TS Config!):
TCEFORM.pages {
layout.addItems.3 = Shiny new page
}
Run Code Online (Sandbox Code Playgroud)
请参阅TSconfig