1
我有一個帶有3個現有佈局選項的Typo3安裝。這些在page.ts所有文件中聲明,像這樣:如何向Typo3「佈局」下拉列表中添加新模板
#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]
而且他們都在這個名單進一步下跌的page.ts文件,像這樣:
TCEFORM.pages {
layout.altLabels.0 = Normal
layout.altLabels.1 = Startpage
layout.altLabels.2 = Landing page
}
所有這些佈局選項在「編輯頁面(X)」>「外觀」頁面的CMS中顯示在可能的佈局選項的下拉列表中。便利!
現在我有了一個閃亮的新模板,我想添加爲選項。我可以通過將此代碼添加到page.ts其應用到特定的頁面ID(比如,頁面編號563):
但我似乎無法將其添加爲在新的佈局選項下拉式菜單。我試過這個:
#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
}
但是沒有香蕉。它不會顯示在外觀佈局列表中,所以我無法將其應用於頁面。
我錯過了什麼?是否還有其他地方需要聲明此模板文件,以便它將顯示爲下拉列表中的選項?
完美,這正是我一直在尋找。我的閃亮新佈局現在可以在佈局下拉菜單中找到,並且所有內容都可以正常工作。非常感謝你! – Ila 2012-03-19 11:10:55