[TYPO3-dev] Main Module Creation: into snippets?

Stefano Cecere scecere at krur.com
Thu Dec 10 01:58:04 CET 2009


what about posting snippets on http://snippets.typo3.org/ ?
^_^

maybe the user who receives/find a solution to something (maybe with the  
help of the community) could help others by posting the solution on this  
(still pretty ugly but really useful) repository?

what do you think?

thanks!


stefano


On Wed, 09 Dec 2009 23:08:00 +0100, Andreas Wagner  
<andreas.wagner at klee.se> wrote:

> Hi,
>
> This is how I do it in an extension of mine. In ext_tables.php:
>
> // add BE modules after file module
> if (TYPO3_MODE == 'BE')	{
> 	if (!isset($GLOBALS['TBE_MODULES']['myMainModule']))	{
> 		$temp_TBE_MODULES = array();
> 		foreach($GLOBALS['TBE_MODULES'] as $key => $val) {
> 			if ($key === 'file') {
> 				$temp_TBE_MODULES[$key] = $val;
> 				$temp_TBE_MODULES['myMainModule'] = $val;
> 			} else {
> 				$temp_TBE_MODULES[$key] = $val;
> 			}
> 		}
> 		$GLOBALS['TBE_MODULES'] = $temp_TBE_MODULES;
> 		unset($temp_TBE_MODULES);
> 	}
> 	t3lib_extMgm::addModule('myMainModule', '', '',  
> t3lib_extMgm::extPath($_EXTKEY) . 'mod_main/');
> 	t3lib_extMgm::addModule('myMainModule', 'mySubModule', '',  
> t3lib_extMgm::extPath($_EXTKEY) . 'mod_sub/');
> 	t3lib_extMgm::addModule('myMainModule', 'mySubModule2', '',  
> t3lib_extMgm::extPath($_EXTKEY) . 'mod_sub2/');
> }




More information about the TYPO3-dev mailing list