我在“ fileadmin”文件夹中有一个可以正常工作的模板。但是我尝试将数据加载到该html文件中。
我在打字稿中的Page
部分看起来像这样:
page = PAGE
page.20 = FLUIDTEMPLATE
page.20 {
templateName = index1
templateRootPaths.20 = fileadmin/templates/temp/
table = tt_content
select {
selectFields = tt_content.*
where = colPos = 0
orderBy = tt_content.sorting
}
}
如果我删除templateName
和templateRootPaths
,会收到错误消息。
答案 0 :(得分:0)
我认为您在复制该代码时错过了几行。
select
中没有FLUIDTEMPLATE
属性。
如果要向Fluid提供一些数据,则需要使用属性variables
:
page = PAGE
page.20 = FLUIDTEMPLATE
page.20 {
templateName = index1
templateRootPaths.20 = fileadmin/templates/temp/
variables {
columnData = CONTENT
columnData {
table = tt_content
select {
selectFields = tt_content.*
where = colPos = 0
orderBy = tt_content.sorting
}
}
// it's the same:
columnData2 < styles.content.get
}
}
在液体中,您可以使用:
{columnData->f:format.raw()}