[Typo3] Input for a plugin

René Schade schade at hypergenic.com
Thu Jun 30 13:21:16 CEST 2005


Well, let me answer my own question 

> If I create a plugin, and I want the plugin to be able to 
> read som arguments, I do this by extending tt_content. Doing 
> this using the kickstarter I get:
> 
> ##### ext_tables.php #####
> <?php
> if (!defined ("TYPO3_MODE"))     die ("Access denied.");
> 
> if (TYPO3_MODE=="BE")    {
>         
>     
> t3lib_extMgm::addModule("web","txitevnewsstatus2M1","",t3lib_e
> xtMgm::extPath($_EXTKEY)."mod1/");
> }
> 
> $tempColumns = Array (
>     "tx_itevnewsstatus2_test" => Array (        
>         "exclude" => 1,        
>         "label" => 
> "LLL:EXT:itev_news_status_2/locallang_db.php:tt_content.tx_ite
> vnewsstatus2_test",        
>         "config" => Array (
>             "type" => "text",
>             "cols" => "30",    
>             "rows" => "5",
>         )
>     ),
> );
> 
> 
> t3lib_div::loadTCA("tt_content");
> t3lib_extMgm::addTCAcolumns("tt_content",$tempColumns,1);
> t3lib_extMgm::addToAllTCAtypes("tt_content","tx_itevnewsstatus
> 2_test;;;;1-1-1");
> ?>
> ##########################

Solution: remove the addToAllTCAtypes, and add the following:

$TCA["tt_content"]["types"]["list"]["subtypes_addlist"][$_EXTKEY."_pi1"]="tx_itevnewsstatus2_test;;;;1-1-1";

...

It seems like the kickstarter dosent support this feature - yet.

Regards,
René



More information about the TYPO3-english mailing list