我尝试添加一个名为confirmAgbAction
的动作的新控制器。该插件不允许控制器“X”
<?php
namespace Eddcapone\MyExtension\Controller;
/**
* CustomController
*/
class CustomController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* action list
*
* @return void
*/
public function confirmAgbAction()
{
echo "<p>HALLO WELT</p>";
}
}
我甚至把它添加到ext_localconf.php
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Eddcapone.' . $_EXTKEY,
'Myfilelist',
array(
'Category' => 'list,show',
'File' => 'show',
'Download' => 'download',
'Custom' => 'confirmAgb'
),
// non-cacheable actions
array(
'Category' => 'list,show',
'File' => 'topFive',
'Download' => 'download',
'Custom' => 'confirmAgb'
)
);
这是我如何调用模板中的作用:
<f:link.action controller="Custom" action="confirmAgb" pluginName="Myfilelist" class="mbButton">Download</f:link.action>
不过,我总是得到:
#1313855173: The controller "Custom" is not allowed by this plugin. Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.
在一开始的最愚蠢的问题:你您已使用“清除所有缓存”来清除安装工具中的缓存 - 按钮? –
从安装工具清除缓存 –
不是一个愚蠢的问题;)是我清除了所有3个缓存,甚至清除了'typo3temp' – Black