Search code examples
typo3typoscriptfluidextbasetypo3-7.6.x

Configure full screen backend module for typo3 custom extension


I am new to typo3 extension development, i have created extension with extension_builder as well as backend module too.

ext_tables.php

if (TYPO3_MODE === 'BE') {

        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
            'USER.Webuser',
            'web', // Make module a submodule of 'web'
            'bewebuser', // Submodule key
            '', // Position
            [
                'Users' => 'list, show, new, create, edit, update, delete',
            ],
            [
                'access' => 'user,group',
                'icon'   => 'EXT:' . $extKey . '/Resources/Public/Icons/user_mod_bewebuser.svg',
                'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_bewebuser.xlf',
            ]
        );

    }

Typoscript :

# Setting up template
module.tx_webuser_web_webuserbewebuser {
    persistence {
       storagePid = {$module.tx_webuser_bewebuser.persistence.storagePid}
    }
    view {
        templateRootPaths = EXT:webuser/Resources/Private/Backend/Templates/
        partialRootPaths = EXT:webuser/Resources/Private/Backend/Partials/
        layoutRootPaths = EXT:webuser/Resources/Private/Backend/Layouts/
    }
}

Its working file. here is my BE module: enter image description here

But, i want to create full area including page tree. Can anyone tell me how to remove page tree for my custom extension use? I want to use entire area for my custom extension.

Thanks an advance!


Solution

  • After taking a look into the source, it seems you can add the option 'navigationComponentId' => '', to the last argument of registerModule to get what you want.

    Edit: 2021-02-10. For TYPO3 10 you need to additionally add 'inheritNavigationComponentFromMainModule' => false to the list. I'd assume that only applies if the main module (web in this case) has the page tree activated.

    In your example it would be:

    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
        'USER.Webuser',
        'web', // Make module a submodule of 'web'
        'bewebuser', // Submodule key
        '', // Position
        [
            'Users' => 'list, show, new, create, edit, update, delete',
        ],
        [
            'access' => 'user,group',
            'icon'   => 'EXT:' . $extKey . '/Resources/Public/Icons/user_mod_bewebuser.svg',
            'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_bewebuser.xlf',
            'navigationComponentId' => '',
            'inheritNavigationComponentFromMainModule' => false,
        ]
    );