【发布时间】:2023-03-10 01:59:01
【问题描述】:
我尝试覆盖 Fluid Styled Content 元素,但在最新的 TYPO3 版本 8.7.0 中根本不起作用。
我有一个模板扩展(键:biv_main),我在其中添加了我的覆盖模板路径:
lib {
fluidContent {
templateRootPaths {
30 = EXT:biv_main/Resources/Private/Content/fluid_styled_content/Templates/
}
partialRootPaths {
30 = EXT:biv_main/Resources/Private/Content/fluid_styled_content/Partials/
}
layoutRootPaths {
30 = EXT:biv_main/Resources/Private/Content/fluid_styled_content/Layouts/
}
}
}
通过 TS 对象浏览器在后端的 TypoScript 对我来说看起来是正确的: Screenshot TypoScript object browser - lib.fluidcontent
我已经从 sysext fluid_styled_content 复制了整个模板、部分和布局文件夹以及其中的每个文件,因此每个内容元素都应该被覆盖。
这是我在模板扩展中的文件夹结构:
biv_main
-- Resources
-- Private
-- Content
-- fluid_styled_content
-- Layouts
-- Partials
-- Templates
文件夹中的文件与 sys-ext fluid_styled_content/Resources/Private/ 中的文件完全相同
Fluid Content Elements 的静态印刷模板在模板扩展 biv_main 之前加载。
您有什么想法或线索缺少什么以及为什么它不起作用?
【问题讨论】:
-
对我来说效果很好。我直接使用了 TS 常量 styles.templates.templateRootPath、styles.templates.partialRootPath、styles.templates.layoutRootPath。我唯一注意到的是带有小写首字母的“fluid_styled_content”。
-
请尝试将
fluid_styled_content中的第一个F改为大写。 -
你在哪里使用
lib.fluidContent?您的 TS 不会覆盖tt_content.*,您需要在复制使用lib.fluidContent之前定义覆盖。 -
见
typo3_src-8.7.4\typo3\sysext\fluid_styled_content\Configuration\TypoScript\Helper\ContentElement.txt后备..lib.fluidContent < lib.contentElement.而且还是不行?
标签: typo3 typoscript typo3-8.x fluid-styled-content