[TYPO3-english] Extending tt_news

Krystian Szymukowicz t33k at prolabium.com
Tue Dec 7 13:39:19 CET 2010


W dniu 2010-12-07 11:13, Tomiţă MILITARU pisze:
> Hello,
>
> I'm trying to extend tt_news with an additional field, actually I'm making
> use of the field fe_group, but in the BEform I want it to look different.
> I've tried doing it like this, as the documentation says, but I don't see
> any changes in the news form. In ext_tables.php of my extension:
>
> $tempColumns = Array (
>      'fe_group' =>  Array (
>      'label' =>  'Tuple:',
>      'config' =>  Array (
>          'type' =>  'select',
>          'size' =>  '5',
>          'maxitems' =>  '200',
>          'minitems' =>  '0',
>          'items' =>  Array (
>              Array('LLL:EXT:lang/locallang_general.php:LGL.hide_at_login',
> -1),
>              Array('LLL:EXT:lang/locallang_general.php:LGL.any_login', -2),
>              Array('LLL:EXT:user_tuple/locallang_db.xml:groupTuple_div',
> '--div--')
>          ),
>          'selectedListStyle' =>  'width:400px',
>          'itemListStyle' =>  'width:350px',
>          'exclusiveKeys' =>  '0,-1,-2',
>          'wizards' =>  Array(
>          '_PADDING' =>  1,
>          '_VERTICAL' =>  1,
>          'popup' =>  Array(
>              'type' =>  'popup',
>              'title' =>  'LLL:EXT:user_tuple/locallang_db.php:wizard.title',
>              'icon' =>  'add.gif',
>               'params' =>  Array(
>              'pid' =>  $feGroupStoragePid,
>              ),
>              'script' =>  'EXT:user_tuple/class.sc_wizard_fegroup.php',
>              'JSopenParams' =>
> 'height=400,width=600,status=0,menubar=0,scrollbars=1',
>          )
>          ),
>          'itemsProcFunc' =>  'tx_tupleitems->tupleElement',
>      )
>      )
> );
>
> t3lib_div::loadTCA("tt_news");
> t3lib_extMgm::addTCAcolumns("tt_news",$tempColumns,1);
> t3lib_extMgm::addToAllTCAtypes('tt_news','fe_group;;;;1-1-1');
> t3lib_extMgm::addStaticFile($_EXTKEY,'static/','Tuple');
>

If I were you I would look at existing and working extensions that adds 
fields.
For exammple danp_extendnews

-- 
grtz
Krystian Szymukowicz


More information about the TYPO3-english mailing list