[TYPO3-dev] How do I add existing records with IRRE?

Loek Hilgersom hilgersom at xs4all.nl
Fri Jan 22 13:32:59 CET 2010


Hi,

I have moved an existing database into a TYPO3 setup, and will manage the 
database using several IRRE relations. The existing database uses fields with 
comma separated values instead of mm tables in order to link to other tables.

This is not a problem for setting up the IRRE relations between the tables, but 
I can't work out how to add existing child records to a parent record. (right 
now, you can create new child records, but not add existing ones)

I probably need "foreign_selector", but the examples I found [1] all work with 
an intermediate table. I experimented a bit and succeeded to get a selectbox to 
show up, but if I select an item it creates an empty child record, instead of 
adding the chosen record to the parent.

My TCA additions:

In child table:

		'selector_field' => array (		
			'config' => array (
				'type' => 'select',	
				'foreign_table' => 'child_table',	
				'size' => 3,	
				'minitems' => 0,
				'maxitems' => 100,
			)
		),



In parent table:
			'config' => array (
				'type' => 'inline',
				'foreign_table' => 'child_table',
				'foreign_selector' => 'selector_field',
				'maxitems' => 100,
				'appearance' => Array(
					'collapseAll' => 1,
					'expandSingle' => 1,
				)
			),

Any ideas how to solve this?

Thanks,
Loek


[1] 
http://typo3.org/documentation/document-library/extension-manuals/irre_tutorial/0.1.10/view/1/2/




More information about the TYPO3-dev mailing list