The default controller for extension and plugin can not be determined ERROR in TYPO3

前端 未结 2 1065
走了就别回头了
走了就别回头了 2020-12-21 13:30

I built an extension and I would like to add plugin options at the time of adding the plugin to the page

 Extension Name : hotels

in Hotel

2条回答
  •  离开以前
    2020-12-21 14:06

    Try it.

    in ext_localconf.php

    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
        'TYPO3.' . $_EXTKEY,
        'hotels',
        array(
            'Hotel' => 'list,single,display,update,save,preview,edit'
        ),
        // non-cacheable actions
        array(
            'Hotel' => 'list',
        )
    );
    

    in ext_tables.php

    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
        $_EXTKEY,
        'hotels',
        'list of Hotels'
    );
    
    $extensionName  = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY);
    $pluginSignature = strtolower($extensionName). '_hotels';
    
    
    if (TYPO3_MODE === 'BE') {
    
        /**
         * Registers a Backend Module
         */
        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
            'TYPO3.' . $_EXTKEY,
            'web',   // Make module a submodule of 'web'
            'hotels',   // Submodule key
            '',                     // Position
            array(
                'Hotel' => 'list,single,display,update,save,preview,edit'
            ),
            array(
                'access' => 'user,group',
                'icon'   => 'EXT:' . $_EXTKEY . '/ext_icon.gif',
                'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_hotels.xlf',
            )
        );
    
    }
    
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Hotels List');
    

    @Clear cache and remove typo3temp data

提交回复
热议问题