问题描述
我正在使用TYPO3 v10.4。与新闻扩展名。我想添加自己的模板,可以在不同页面上对其进行自定义。
在我的Setup.ts中,我定义了:
plugin.tx_news {
view {
templateRootPaths >
templateRootPaths {
0 = EXT:news/Resources/Private/Templates/
1 = Resources/Private/Ext/news/Templates/
}
partialRootPaths >
partialRootPaths {
0 = EXT:news/Resources/Private/Partials/
1 = Resources/Private/Ext/news/Partials/
}
layoutRootPaths >
layoutRootPaths {
0 = EXT:news/Resources/Private/Layouts/
1 = Resources/Private/Ext/news/Layouts/
}
#widget.GeorgRinger\News\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = Resources/Private/Ext/news/Templates/
}
settings {
list {
cropMaxCharactersSmall = 100
cropMaxCharactersHigh = 500
}
}
templateLayouts {
1 = Homepage
2 = Default Layout
}
}
不幸的是,我定义的布局没有出现在新闻插件的BE中。 该设置通常可以正常运行,因为我使用的是自定义的模板和部分以及设置部分中的变量。
有人知道可能会丢失什么吗?
解决方法
tx_news.templateLayouts
属于您的TSConfig,而不属于TypoScript设置。
顺便说一句,您的TypoScript代码段看起来有些怪异。我尝试过重新格式化,但也许您想再次进行仔细检查。