【问题标题】:TYPO3 8.7 can not override Fluid Styled Content templatesTYPO3 8.7 不能覆盖 Fluid Styled Content 模板
【发布时间】: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


【解决方案1】:

TypoScript 库已更改,请参阅 Overriding the FLUID templates

所以你需要覆盖lib.contentElement 而不是lib.fluidContent

【讨论】:

  • 救了我的命。谢谢!
  • 如果对您有帮助,请考虑将此问题标记为已解决。谢谢!
  • @KlausFragenbert 标记此答案,将对其他人有所帮助。
猜你喜欢
  • 1970-01-01
  • 2019-04-11
  • 1970-01-01
  • 1970-01-01
  • 2016-10-17
  • 1970-01-01
  • 2020-12-07
  • 2013-09-25
  • 1970-01-01
相关资源
最近更新 更多