[TYPO3-mvc] Select and foreign_field
Yann PETIT
web at agencefmc.com
Fri Jul 9 11:13:28 CEST 2010
Thank you very much for your reply, and informations about
'foreign_selector'.
But, as this seems to work (for me), usage of 'foreign_selector' needs MM
relation and still displays Inline records
(quite heavy for more than 100 child records)
I will try with MM Relation (with regrets for 1-n relation) and keep the
select display.
Yann
> Hi Yann,
>
>> I try to have a 1->n relation managed with 'foreign_field' like 'inline
>> fields' but I would like to display this as a multiple select.
>> ------------------------
>> In the Parent,
>> childs int(11)
>> ------------------------------
>> 'childs' => array (
>> 'exclude' => 0,
>> 'config' => array (
>> 'type' => 'select',
>> 'foreign_table' => 'tx_ext_domain_model_child',
>> 'foreign_table_where' => 'AND
>> tx_ext_domain_model_child.pid=###CURRENT_PID###',
>> 'foreign_field' => 'parent',
>> 'size' => 30,
>> 'minitems' => 0,
>> 'maxitems' => 999,
>> )
>> ),
> ...
>> -----------------------------------
>> This works well with Extbase (count of childs in parent.childs and
>> parent.uid in child.parent) , but Typo3 4.4.0 BackEnd (like my previous
>> version) refuse to use this format... and try a comma separated list in
>> parent.childs.
>>
>> Please, can someone tell me :
>> If I can do that ?
>> If there is a way to get this working in the backend ?
>
> TCA type 'select' doesn't support 'foreign_field' - so this won't work in
> the BE. You could try switching it to IRRE and try using foreign_selector.
> For documentation see [1].
>
>
> [1]
> http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.3.0/view/4/2/#id2529282
>
> --
> kind regards,
> Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list