GNB*_*GNB 1 typo3 fluid typoscript extbase typo3-7.6.x
我是typo3扩展开发的新手,我也使用extension_builder创建了扩展以及后端模块。
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',
]
);
}
Run Code Online (Sandbox Code Playgroud)
打字稿:
# 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/
}
}
Run Code Online (Sandbox Code Playgroud)
但是,我想创建包括页面树在内的完整区域。谁能告诉我如何删除页面树以供自定义扩展使用?我想将整个区域用于我的自定义扩展。
提前致谢!
查看源代码后,似乎您可以将选项添加'navigationComponentId' => '',到 registerModule 的最后一个参数中以获得您想要的内容。
编辑:2021 年 2 月 10 日。对于 TYPO3 10,您需要另外添加'inheritNavigationComponentFromMainModule' => false到列表中。我假设仅当主模块(本例中为 Web)激活了页面树时才适用。
在你的例子中它将是:
\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,
]
);
Run Code Online (Sandbox Code Playgroud)