TYPO3 8.7无法覆盖Fluid Styled Content模板。

6

我尝试覆盖Fluid Styled Content元素,但在最新的TYPO3 8.7.0版本中完全不起作用。

我有一个模板扩展(key: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看起来对我来说是正确的:TypoScript对象浏览器截图 - 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内容元素的静态typoscript模板在模板扩展biv_main之前加载。
您有任何想法或线索缺少什么,以及为什么不起作用吗?

对我来说,它很好用。我直接使用了TS常量styles.templates.templateRootPath、styles.templates.partialRootPath和styles.templates.layoutRootPath。 我唯一注意到的是"fluid_styled_content"的首字母小写。 - Riccardo De Contardi
请尝试将 fluid_styled_content 中的第一个 F 改为大写。 - pgampe
你会在哪里使用 lib.fluidContent?你的 TS 不会覆盖 tt_content.* 并且你需要在任何复制使用 lib.fluidContent 之前定义覆盖。 - pgampe
查看 typo3_src-8.7.4\typo3\sysext\fluid_styled_content\Configuration\TypoScript\Helper\ContentElement.txt 的回退。lib.fluidContent < lib.contentElement。还是不行吗? - user2310852
1个回答

22

TypoScript lib已经更改,请参阅覆盖FLUID模板

因此,您需要覆盖lib.contentElement而不是lib.fluidContent


拯救了我的生命。谢谢! - José Ricardo Júnior
1
如果这个问题对您有所帮助,请考虑将其标记为已解决。谢谢! - mtness
@KlausFragenbert,请标记此答案,将有助于其他人。 - develth

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接