TYPO3 V10.4中Backend Layout配合Fluidtemplate的适配问题
TYPO3 V10.4 Backend Layout适配核心修改点
- 废弃levelfield语法,替换为level语法
原有key.data = levelfield:-1, backend_layout_next_level, slide写法已经失效,需调整为冒号分隔的level语法:key.data = level:-1:backend_layout_next_level, slide - 模板路径配置必须使用数组下标形式
TYPO3 V10.4不再支持单值的路径配置写法,原有partialRootPath、layoutRootPath、templateRootPath需调整为带数组下标的复数形式,示例如下:page.10 { partialRootPaths.0 = {$resDir}/Private/Partials layoutRootPaths.0 = {$resDir}/Private/Layouts } - Backend Layout标识符前缀规则调整
若你的Backend Layout是通过站点管理(Site Management)配置而非PageTSconfig配置,标识符前缀会从原有pagets__变更为site_<站点标识>_前缀,需对应修改CASE对象的键名;若仍使用PageTSconfig定义Backend Layout,pagets__前缀保持兼容。
适配后完整TypoScript参考
page.10 = FLUIDTEMPLATE page.10 { partialRootPaths.0 = {$resDir}/Private/Partials layoutRootPaths.0 = {$resDir}/Private/Layouts file.stdWrap.cObject = CASE file.stdWrap.cObject { key.data = level:-1:backend_layout_next_level, slide key.override.field = backend_layout # Default Template default = TEXT default.value = {$resDir}/Private/Templates/Grid_12_Template.html ## weitere Templates pagets__1 = TEXT pagets__1.value = {$resDir}/Private/Templates/Grid_12_Template.html pagets__2 = TEXT pagets__2.value = {$resDir}/Private/Templates/Grid_6-6_Template.html pagets__3 = TEXT pagets__3.value = {$resDir}/Private/Templates/Grid_8-4_Template.html } }
额外验证点
- 确认constants.typoscript中的
resDir路径对应扩展是否已正确安装、路径拼写无误 - 可通过TypoScript对象浏览器(Template模块的Object Browser)检查
page.10配置是否正确加载,确认路径拼接结果符合预期
内容的提问来源于stack exchange,提问作者Dan
相关产品推荐
相关产品推荐

