Я использую TYPO3 7.6.13 и пытаюсь настроить расширение новостей. Я пытаюсь вставить свой собственный шаблон, но TYPO3 не может его найти, поэтому шаблон по умолчанию всегда включен.
Я настроил файлы setup.txt и constants.txt внутри каталога Configuration / TypoScript.
Я также создал собственные каталоги для шаблонов и партиалов внутри каталога fileadmin: fileadmin / templates / ext / news / templates / fileadmin / templates / ext / news / partials /
Это часть setup.txt:
plugin.tx_news {
mvc.callDefaultActionIfActionCantBeResolved = 1
view {
templateRootPaths {
0 = EXT:news/Resources/Private/Templates/
1 = {$plugin.tx_news.view.templateRootPath}
}
partialRootPaths {
0 = EXT:news/Resources/Private/Partials
1 = {$plugin.tx_news.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:news/Resources/Private/Layouts/
1 = {$plugin.tx_news.view.layoutRootPath}
}
widget.GeorgRinger\News\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = EXT:news/Resources/Private/Templates/
}
Я добавил в constants.txt пользовательские каталоги для шаблонов и партиалов, которые я создал внутри fileadmin. Ниже приведен код constants.txt:
plugin.tx_news {
rss.channel {
title = Dummy Title
description =
link = http://example.com
language = en-gb
copyright = TYPO3 News
category =
generator = TYPO3 EXT:news
}
opengraph {
site_name =
twitter {
card = summary
site =
creator =
}
}
view {
# cat=plugin.tx_news/file; type=string; label=Path to template root (FE)
templateRootPath = fileadmin/templates/ext/news/templates/
#templateRootPath.1 = EXT:news/Resources/Private/Templates/
# cat=plugin.tx_news/file; type=string; label=Path to template partials (FE)
partialRootPath = fileadmin/templates/ext/news/partials/
#partialRootPath.2 = EXT:news/Resources/Private/Partials/
# cat=plugin.tx_news/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:news/Resources/Private/Layouts/
}
settings {
# cat=plugin.tx_news/file; type=string; label=Path to CSS file
cssFile = EXT:news/Resources/Public/Css/news-basic.css
}
}
Любая помощь приветствуется! Денис