[TYPO3] Name instead of UID in extension

Jeppe Donslund jd at webmasters.dk
Wed Aug 8 09:14:35 CEST 2007


Hi John,

I hope you still can help me.

In the selectbox it showing titles, but I need the UID to be stored in 
the database. Is that possible?
If I look at the TCA in tt_news I find this:

'foreign_table' => 'tt_news_cat',
#'foreign_table_where' => $fTableWhere.' ORDER BY 
tt_news_cat.'.$confArr['category_OrderBy'],
'wizards' => Array(
	'_PADDING' => 2,
	'_VERTICAL' => 1,
	'add' => Array(
		'type' => 'script',
		'title' => 
'LLL:EXT:tt_news/locallang_tca.php:tt_news_cat.createNewParentCategory',
		'icon' => 'EXT:tt_news/res/add_cat.gif',
		'params' => Array(
			'table'=>'tt_news_cat',
			'pid' => $sPid,
			'setValue' => 'set'
		),
		'script' => 'wizard_add.php',
	),
	'list' => Array(
		'type' => 'script',
		'title' => 'LLL:EXT:tt_news/locallang_tca.php:tt_news_cat.listCategories',
		'icon' => 'list.gif',
		'params' => Array(
			'table'=>'tt_news_cat',
			'pid' => $sPid,
		),
		'script' => 'wizard_list.php',
					),
				),

But I can't figure out how to implement it in my TCA.

Regards,
Jeppe D


John de Stigter skrev:
>  
>> Hi John.
>>
>> I have tried to figure out how to solve it with the TCA. I'll 
>> read some more.
>>
>> My TCA for det field is:
>>
>> "crossreferences" => Array (		
>> 	"exclude" => 1,		
>> 	"label" =>
>> "LLL:EXT:wm_pf_videos/locallang_db.xml:tx_wmpfvideos_videos.cr
>> ossreferences", 
>> 	
>> 	"config" => Array (
>> 		"type" => "select",	
>> 		"foreign_table" => "tx_wmpfvideos_videos",	
>> 		"foreign_table_where" => "ORDER BY 
>> tx_wmpfvideos_videos.uid",	
>> 		"size" => 5,	
>> 		"minitems" => 0,
>> 		"maxitems" => 10,	
>> 		"MM" => "tx_wmpfvideos_videos_crossreferences_mm",
>> 	)
>> )
>>
> 
> Hi, what is the value of "label" in the "ctrl" section of the table
> "tx_wmpfvideos_videos"? This should be defined in the file
> "ext_tables.php" in the directory of the extension.
> 
> Cheerios,
> John


More information about the TYPO3-english mailing list