Typo3:未找到模板。无法解决视图以进行操作 "list"
Typo3: No template was found. View could not be resolved for action "list"
当我单击左侧的模块时,我收到此错误消息:
Sorry, the requested view was not found.
技术原因是:
No template was found. View could not be resolved for action "list" in class "TYPO3\ShopExtension\Controller\ShopBackendController".
我在这里看到类似的问题,我已经尝试了他们所有的解决方案,但没有成功。例如:
我在配置目录的 constants.ts 文件中设置了模板、部分和布局的根路径,如下所示:
module.tx_shopextension {
view {
templateRootPath = EXT:shop_extension/Resources/Private/Backend/Templates/
partialRootPath = EXT:shop_extension/Resources/Private/Backend/Partials/
layoutRootPath = EXT:shop_extension/Resources/Private/Backend/Layouts/
}
persistence {
# cat=module.tx_shopextension//a; type=string; label=Default storage PID
storagePid =
}
}
并像这样在 setup.ts
中使用它们:
# Module configuration
module.tx_shopextension {
view {
templateRootPath = {$module.tx_shopextension.view.templateRootPath}
partialRootPath = {$module.tx_shopextension.view.partialRootPath}
layoutRootPath = {$module.tx_shopextension.view.layoutRootPath}
}
persistence {
storagePid = {$module.tx_shopextension.persistence.storagePid}
}
}
模板存储在:
Resources/Private/Backend/Templates/
(部分和布局的结构相同)
在Resources/Private/Backend/Templates/
目录中有一个目录ShopBackend
对应ShopBackendController
,包含List.html
文件。
我不明白为什么错误不断出现。
问题是,您使用的是旧方法来定义根路径。
请使用根路径作为数组,如
module.tx_shopextension.view.templateRootPaths.10 = EXT/shop_extension/Resources/Private/Backend/Templates/
当我单击左侧的模块时,我收到此错误消息:
Sorry, the requested view was not found.
技术原因是:
No template was found. View could not be resolved for action "list" in class "TYPO3\ShopExtension\Controller\ShopBackendController".
我在这里看到类似的问题,我已经尝试了他们所有的解决方案,但没有成功。例如:
我在配置目录的 constants.ts 文件中设置了模板、部分和布局的根路径,如下所示:
module.tx_shopextension {
view {
templateRootPath = EXT:shop_extension/Resources/Private/Backend/Templates/
partialRootPath = EXT:shop_extension/Resources/Private/Backend/Partials/
layoutRootPath = EXT:shop_extension/Resources/Private/Backend/Layouts/
}
persistence {
# cat=module.tx_shopextension//a; type=string; label=Default storage PID
storagePid =
}
}
并像这样在 setup.ts
中使用它们:
# Module configuration
module.tx_shopextension {
view {
templateRootPath = {$module.tx_shopextension.view.templateRootPath}
partialRootPath = {$module.tx_shopextension.view.partialRootPath}
layoutRootPath = {$module.tx_shopextension.view.layoutRootPath}
}
persistence {
storagePid = {$module.tx_shopextension.persistence.storagePid}
}
}
模板存储在:
Resources/Private/Backend/Templates/
(部分和布局的结构相同)
在Resources/Private/Backend/Templates/
目录中有一个目录ShopBackend
对应ShopBackendController
,包含List.html
文件。
我不明白为什么错误不断出现。
问题是,您使用的是旧方法来定义根路径。 请使用根路径作为数组,如
module.tx_shopextension.view.templateRootPaths.10 = EXT/shop_extension/Resources/Private/Backend/Templates/