[TYPO3-dev] Symmetric bidirectional MM ralations on the same table
Stefano Cecere
scecere at krur.com
Fri Feb 25 15:41:47 CET 2011
Hi Jochen!
yes it seems you understood well the problem..
but i could not make your configuration work (i got empty form.. tried
several configurations)
what's the sql for your table tx_myext_characters_rel_mm ? has it a TCA
definition?
where do you have those 'character1' and 'character2' fields?
thanks
s
On Fri, 25 Feb 2011 13:56:53 +0100, Jochen Rieger <j.rieger at connecta.ag>
wrote:
> Hi all,
>
>> we are facing the same problem with the up to come "news2" extension
>> (which has, as all news extesnions, relations self 2 self)
>
> hmmm ... if I understood everything correctly this is a similar case
> that I worked on a year or two ago. We had to define relations of
> characters / people that had to be accessible from both sides.
>
> So we created one table for the charcter data and an MM-rel table. The
> important part of the character table's tca is:
>
> 'relations' => array (
> 'exclude' => 0,
> 'label' => 'MyLabale',
> 'config' => array (
> 'type' => 'inline',
> 'foreign_table' => 'tx_myext_characters_rel_mm',
> 'foreign_field' => 'character1',
> 'foreign_label' => 'character2',
> 'foreign_sortby' => 'sorting_char1',
>
> 'symmetric_field' => 'character2',
> 'symmetric_label' => 'character1',
> 'symmetric_sortby' => 'sorting_char2',
>
> 'minitems' => 0,
> 'maxitems' => 100,
> 'appearance' => array (
> 'collapseAll' => 1,
> 'expandSingle' => 1,
> 'newRecordLinkAddTitle' => 1,
> ),
> )
> ),
>
> So ... I just checked the old project and indeed the relations are
> accessible from both related records. The MM-table mainly consists of
> the fields configured above (no uid_local or uid_foreign).
>
> Isn't that what you were looking for?
>
> Regards,
> Jochen
--
____ ___ __ _ ______________________
Stefano Cecere
krur.com multimedia
More information about the TYPO3-dev
mailing list