[TYPO3-dev] TYPO3 BE extensions: sub and main modules and registerModule()

Michael Schams typo3.lists at 2014.trash.schams.net
Sat Jul 26 07:59:41 CEST 2014


On 23/07/14 02:13, Philipp Gampe wrote:

>> You mean, introduce a third extension?
 >
> [...] In the new extension, you can register the main module and
> then, in the two extensions, you can already assume that the main
> module exists.

That works... more or less :-)

I created a third extension and put the following in ext_tables.php:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
   'foo', // main module
   '',    // sub module
   '',    // position
   '',    // path
   array(
     'labels' => 'My Main Module'
   )
);

The other two extensions (MyExtensionOne and MyExtensionTwo) depend on 
this extension. They both have "foo" as the main module name in their 
registerModule() call and appear correctly in the BE.

The remaining problem is, that the label "My Main Module" of the main 
module is not shown. The HTML source shows:

--- begin ---
...
<li id="foo" class="menuSection">
   <div class="modgroup expanded"></div>
   <ul>
     <li class="submodule mod-foo_MyExtensionOne" id="foo_MyExtensionOne">
       ...
     </li>
     <li class="submodule mod-foo_MyExtensionTwo" id="foo_MyExtensionTwo">
       ...
     </li>
   </ul>
</li>
...
--- end ---

I would expect the label here:

<div class="modgroup expanded">My Main Module</div>

Any idea what I am doing wrong?


Cheers
Michael



More information about the TYPO3-dev mailing list