Typo3 覆盖扩展模板的最佳方法

Typo3 覆盖扩展模板的最佳方法,typo3,typo3-7.6.x,Typo3,Typo3 7.6.x,覆盖typo3扩展的标准模板以便保存以进行更新的最佳方法是什么 谢谢 我试过这个: plugin.tx_news { view { templateRootPath = fileadmin/webdesign/templates/news/Templates/ partialRootPath = fileadmin/webdesign/templates/news/Partials/

覆盖typo3扩展的标准模板以便保存以进行更新的最佳方法是什么

谢谢

我试过这个:

plugin.tx_news {
        view {
                templateRootPath = fileadmin/webdesign/templates/news/Templates/
                partialRootPath = fileadmin/webdesign/templates/news/Partials/
                layoutRootPath = fileadmin/webdesign/templates/news/Layouts/
        }
}

但一切都没有改变

这里有一个来自tx_新闻文档的示例:

打字脚本设置语法如下所示:

plugin.tx_news {
        view {
                templateRootPaths {
                        0 = EXT:news/Resources/Private/Templates/
                        1 = EXT:fileadmin/templates/ext/news/Templates/
                }
                partialRootPaths {
                        0 = EXT:news/Resources/Private/Partials/
                        1 = fileadmin/templates/ext/news/Partials/
                }
                layoutRootPaths {
                        0 = EXT:news/Resources/Private/Layouts/
                        1 = fileadmin/templates/ext/news/Layouts/
                }
        }
}
文件传送组新闻:

第3类文件:

这里是slickcarousel的另一个示例:


重要的是要知道: 在TYPO3 CMS 6.2和之前,您可以直接覆盖设置

templateRootPath  = /path/to/you/template
在TYPO3 CMS 7.6及更高版本中,您可以在Fluid/TYPO3查找模板的位置装箱一个数组。命名不同(现在以“s”结尾),必须是数组

所以6.x版的旧示例在7.6中不起作用

templateRootPaths {
    0 = /path/to/originalExtension/template
    1 = /path/to/you/template
}
同样适用于partialRootPath->now partialRootPath和layoutRootPath->now layoutRootPath

这个新数组的优点:如果您只想覆盖一个部分或一个模板:在您自己的扩展名或Fileadin文件夹中创建目录,然后将这个已更改的文件放在那里

->文件名仍应相同
->查找CamelCase错误(例如,文件夹名称应为“Layouts”,而不是“Layouts”。。这可能适用于windows测试系统,但不适用于linux生产环境。。
->清除键入3缓存..一如既往..

我已添加了上面的代码,但没有任何更改…?是否要覆盖tx_新闻?您必须使用“TemplateRootPath”>上面的代码是从tx_新闻手册复制的…只是更改了适合我的路径星座的路径您是否将其添加到常量或设置中?