[TYPO3-english] Add selector to tt_news with external table

Iban cardona at opus5.info
Fri Apr 4 12:50:34 CEST 2014


Hello,

I'm trying to add a select in tt_news extension that shows all values of 
a specific table created by me. I added these lines to ext_tables.php of 
my extension but when the selector appears it shows all items of the 
table but every value of the option shows "no title":

|$TCA['my_table'] = array(||
||    'ctrl' => array(||
||        'label' => 'name',||
||        'title' => 'my_table',||
||        'tstamp' => 'tstamp',||
||        'readOnly' => 1,||
||        'adminOnly' => 1,||
||        'rootLevel' => 1,||
||        'default_sortby' => 'ORDER BY name',||
||        'sortby' => 'name',||
||        'crdate' => 'crdate',||
||        'delete' => 'deleted'||
||    )||
||);||
||
||$tempColumns = Array (||
||    "tx_ttnews_new_field" => Array (||
||        "exclude" => 0,||
||        "label" => "new field",||
||        "config" => Array (||
||            "type" => "select",||
||            "foreign_table" => "my_table",||
||                        "size" => 1,||
||                        "minitems" => 0,||
||                        "maxitems" => 1||
||        )||
||    )||
||);||
||
||t3lib_div::loadTCA("tt_news");||
||t3lib_extMgm::addTCAcolumns("tt_news",$tempColumns,1);||
||t3lib_extMgm::addToAllTCAtypes("tt_news","tx_ttnews_new_field;;;;1-1-1", 
"", "after:sys_language_uid");|

Could you help me?

Thank you so much,
Iban.


More information about the TYPO3-english mailing list