[TYPO3-dev] irre something like foreign_table_where

Stano Paška stano.paska at gmail.com
Wed Nov 2 14:51:59 CET 2011


Hi list.

I am making some extension with irre records.
I have one record with six irre relations to same subrecords.
Subrecord has one field "category".

I need filter out subrecords, that in Accommodation relation appears 
only subrecords with accommodation category selected.

This can be done with something like foreign_table_where, but this is 
not implemented in TCA type='inlíne'.

# irre
$irre = array(
	'type' => 'inline',
	'foreign_table' => 'tx_kiosreviews_record',
	'foreign_field' => 'review',
	'foreign_label' => 'usertext',
	'appearance' => array('collapseAll' => 1, 'expandSingle' => 1),
);
$TCA['tx_kiosreviews_review']['columns']['accommodationirre']['config'] 
= $irre;
$TCA['tx_kiosreviews_review']['columns']['accommodationirre']['config']['foreign_table_where'] 
= ' AND category=1';
$TCA['tx_kiosreviews_review']['columns']['foodirre']['config'] = $irre;
$TCA['tx_kiosreviews_review']['columns']['foodirre']['config']['foreign_table_where'] 
= ' AND category=2';


Can be done this with another way?

Thanks for your answers.

Stano.


More information about the TYPO3-dev mailing list