[TYPO3-dev] Bidirectional MM relations
Tomi Hrovatin
tomi at tri-ex.si
Mon Feb 12 11:06:21 CET 2007
Hi,
it works now. Thnx.
If somebody needs this, here is the solution for using one bidirectional
MM table (for all relations with companies) and type='select':
TCA for companies (local table):
"employees" => Array (
'label' => 'LLL:EXT:ext_name/locallang_db.xml:employees',
'config' => array (
'type' => 'select',
'size' => 3,
'autoSizeMax' => 30,
'minitems' => 3,
'maxitems' => 10,
'foreign_table' => 'tx_employees',
"MM" => 'tx_companies_mm_ref',
"MM_match_fields" => Array(
"tablenames" => 'tx_employees'
),
),
)
TCA for employees (foreign table):
"companies" => Array (
'label' => 'LLL:EXT:ext_name/locallang_db.xml:companies',
'config' => array (
'type' => 'select',
'size' => 3,
'autoSizeMax' => 30,
'minitems' => 3,
'maxitems' => 10,
'foreign_table' => 'tx_companies',
"MM" => 'tx_companies_mm_ref',
"MM_foreign_select" => 1,
"MM_opposite_field" => 'employees',
"MM_match_fields" => Array(
"tablenames" => 'tx_employees'
),
),
)
regards,
Tomi Hrovatin
Ingmar Schlecht wrote:
> Tomi Hrovatin schrieb:
>> Hi and thanx again,
>>
>> well, I saw that doc. I also looked in DAM but couldn't get it to work
>> :(. I just can't dig what all these settings mean. DAM is also using
>> settings for mmforeign extension. Yesterday I tested DAM without
>> mmforeign and it works without the problem.
>>
>> Can you explain on example from MM_oposite_field description or maybe
>> have another working example?
>
> MM_oposite_field is already used in the
> http://typo3.org/fileadmin/dl/T3X_mmftest-0_0_0-z-200611301306.t3x
> extension.
>
> The other ones are used by DAM, so you could see how the should be
> configured there. I'll write a doc some time after 4.1 is released.
>
> cheers
> Ingmar
>
--
Tomi Hrovatin
-----------------------
Tri-ex d.o.o.
www.tri-ex.si
www.iPlantCare.com
www.flowerServant.com
www.indoor-plant-care.com
-----------------------
More information about the TYPO3-dev
mailing list