0
votes

I am trying to override a Marker within my Typoscript with content rendered by my custom created extension.

As far as I know It should work like this (Where MENU_PRODUKT_CATEGORIES) is my Marker:

 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. When I var_dump() my ext_localconf.php configuratin this is displayed:

My first Parameter where MoTimeProducts is my extensionName and products my vendorName. Is this correct?

MoTimeProducts.products

The second Parameter should be the pluginName and seems ok, too.

Products

This is how my complete ext_localconf configuration looks like:

    <?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. Below my action within the 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?

Thx for reading.

1

1 Answers

1
votes

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.

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!