[TYPO3-dev] Backend: Where to put new main menu used by several extensions?

Christian Weiske christian.weiske at netresearch.de
Fri Jul 29 08:27:18 CEST 2011


Hi,


Some of your extensions provide backend module and shall get grouped in
their own main module.

Adding modules into a main category is easy with using
> t3lib_extMgm::addModule('company', "txcompanymod', ...);
- if the main category has been created already. If it is not there
yet, it gets the same title as the module.

So to have our custom main category title, we need to add it before the
normal module is added:
> if (!isset($TBE_MODULES['company'])) {
>     t3lib_extMgm::addModule(
>         'company', '', 'after:web',
>         t3lib_extMgm::extPath($_EXTKEY) . 'mod_main/'
>     );
> }
(btw, after:web for main modules works with the patch from
 http://forge.typo3.org/issues/28502
)


Now my question:

Where should we put the creation of the main company module? In every
single extension that wants to add itself as submodule?

That's a pretty bunch of duplicated code that I'd rather have at one
centralized place.


-- 
Viele Grüße
Dipl.-Inf. Christian Weiske

Senior Developer
Netresearch GmbH & Co. KG





More information about the TYPO3-dev mailing list