我正在用流體模板構建網站。我創建了兩個不同的前端佈局和兩個不同的後端佈局,但我總是得到這個錯誤#1288085266:沒有指定模板。使用setTemplateSource()或setTemplatePathAndFilename()。根據Typo3 Wiki,這應該是一個解決方案Exception/CMS/1288085266流體模板不加載
但不是在我的情況。這是我的代碼:
config.doctype = html5
page = PAGE
page {
\t includeCSSLibs.bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css
\t includeCSS.style = fileadmin/templates/rka2015/css/style.css
\t
\t includeJSlibs.jquery = https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
\t includeJSlibs.bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js
\t includeJS.custom = fileadmin/templates/rka2015/js/custom.js
}
\t
page.10 = FLUIDTEMPLATE
page.10 {
\t \t
\t \t file = fileadmin/templates/rka2015/layouts/main_layout.html
\t \t layoutRootPath = fileadmin/templates/rka2015/layouts/
\t \t patialRootPath = fileadmin/templates/rka2015/partials/
\t \t
\t \t variables {
\t \t \t siteName = TEXT
\t \t \t siteName.value = rka2015
\t \t \t
\t \t \t contentMain < styles.content.get
\t \t \t contentMain.select.where = colPos = 0
\t \t \t
\t \t \t content_column_1 < styles.content.get
\t \t \t content_column_1.select.where = colPos = 1
\t \t \t
\t \t \t content_column_2 < styles.content.get
\t \t \t content_column_2.select.where = colPos = 2
\t } \t \t
}
page.10.file.stdWrap.cObject = CASE
page.10.file.stdWrap.cObject
\t {
key.data = levelfield:-1, backend_layout_next_level, slide
key.override.field = backend_layout
default = TEXT
default.value = fileadmin/templates/rka2015/main_1_column.html
1 = TEXT
1.value = fileadmin/templates/rka2015/main_1_column.html
2 = TEXT
2.value = fileadmin/templates/rka2015/main_2_column.html
}
我已經檢查了所有;部分名稱是可以的,後端佈局的ID是可以的,模板是定義的,一切似乎都是應該的。我真的不知道要在哪裏搜索。
更新!
似乎有一個文件路徑有問題。我正在一個子域上運行我的網站,它看起來像ts沒有找到文件路徑,如果他們只被定義爲fileadmin/...任何想法?謝謝
解決方案!
page {
\t includeCSSLibs.bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css
\t includeCSS.style = fileadmin/templates/rka2015/css/style.css
\t
\t includeJSlibs.jquery = https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
\t includeJSlibs.jquery.external = 1
\t includeJSlibs.bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js
\t includeJS.custom = fileadmin/templates/rka2015/js/custom.js
}
page.10 = FLUIDTEMPLATE
page.10 {
template = CASE
template {
key.data = levelfield:-1,backend_layout_next_level,slide
key.override.field = backend_layout
1 = FILE
1.file = fileadmin/templates/rka2015/main_1_column.html
2 = FILE
2.file = fileadmin/templates/rka2015/main_2_column.html
}
partialRootPath = fileadmin/templates/rka2015/partials/
layoutRootPath = fileadmin/templates/rka2015/layouts/
variables {
\t
\t \t \t siteName = TEXT
\t \t \t siteName.value = rka2015
\t \t \t
\t \t \t contentMain < styles.content.get
\t \t \t contentMain.select.where = colPos = 0
\t \t \t
\t \t \t content_column_1 < styles.content.get
\t \t \t content_column_1.select.where = colPos = 1
\t \t \t
\t \t \t content_column_2 < styles.content.get
\t \t \t content_column_2.select.where = colPos = 2
}
}
'file = fileadmin/templates/rka2015/layouts/main_layout.html'正確嗎?也許不是'file = fileadmin/templates/rka2015/main_layout.html'或者'file = fileadmin/templates/rka2015/templates/main_layout.html'或者其他正確的東西? – Jost 2014-11-06 15:05:36
您好Jost,謝謝。路徑是正確的,我檢查過它們。 – ABoooo 2014-11-08 15:10:28