[英]TYPO3 Extension in Typoscript COA does not recognize Default Controller
I am trying to override a Marker within my Typoscript with content rendered by my custom created extension. 我试图用我自定义创建的扩展程序呈现的内容覆盖Typoscript中的标记。
As far as I know It should work like this (Where MENU_PRODUKT_CATEGORIES
) is my Marker: 据我所知,它应该像这样工作(在
MENU_PRODUKT_CATEGORIES
)是我的标记:
MENU_PRODUKT_CATEGORIES = COA
MENU_PRODUKT_CATEGORIES {
10 = USER
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = MoTimeProducts
pluginName = Products
vendorName = products
controller = Category
action = parentList
}
}
The extensionName and related configurations also seem correct to me. extensionName和相关配置对我来说似乎也是正确的。 When I
var_dump()
my ext_localconf.php configuratin this is displayed: 当我
var_dump()
我的ext_localconf.php配置文件显示时:
My first Parameter where MoTimeProducts is my extensionName and products my vendorName. 我的第一个参数,其中MoTimeProducts是我的extensionName,产品是我的vendorName。 Is this correct?
这个对吗?
MoTimeProducts.products
The second Parameter should be the pluginName and seems ok, too. 第二个参数应该是pluginName,看起来也不错。
Products
This is how my complete ext_localconf configuration looks like: 这是我完整的ext_localconf配置的样子:
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'MoTimeProducts.' . $_EXTKEY,
'Products',
array(
'Category' => 'list, parentList',
'Product' => 'list, show, filter, ajaxFilter, refList',
'Formular' => 'display'
),
// non-cacheable actions
array(
'Category' => '',
'Product' => 'ajaxFilter, list',
'Formular' => 'display'
)
);
My Controller and Action configuration seems fine also. 我的Controller and Action配置似乎也不错。 Below my action within the CategoryController
在我在CategoryController中的动作下面
/**
* action list
*
* @return void
*/
public function parentListAction() {
$this->view->assign('categories', $currentCategory = $this->categoryRepository->getHighestLevelCategories($GLOBALS['TSFE']->sys_language_uid));
}
I also have a flex form for the Backend configuration and inserting plugins could this also be a reason? 我还有一个用于后端配置的flex表单,插入插件也可能是原因吗?
Thx for reading. 谢谢你的阅读。
Oh wow it was 哦,哇
MENU_PRODUKT_CATEGORIES = COA
MENU_PRODUKT_CATEGORIES {
10 = USER
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
pluginName = Products
extensionName = Products
vendorName = MoTimeProducts
controller = Category
action = list
switchableControllerActions {
Category {
1 = parentList
}
}
}
}
Where vendorName with a combination of lowercased plugin name is the first paramater for the plugin configuration. 其中vendorName和小写的插件名称的组合是插件配置的第一个参数。
Edit: Turns out it is very bad practice to have the same name for the plugin/extension which can lead to confusion and errors. 编辑:事实证明,为插件/扩展名使用相同名称是非常糟糕的做法,这可能导致混乱和错误。 One should avoid doing it like I did at all cost!
应该避免像我不惜一切代价那样做!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.