[TYPO3-english] BE record localization with related records

Victor Livakovsky v-tyok at mail.ru
Tue Mar 13 15:37:44 CET 2012


Hi, List.

I'm looking for an obvious thing, but can't understand, is it my fault or 
missing core feature. I have an extension, which consists of couple of 
tables, which are linked to each other via MM and not-MM relations. TCA:
'system_category_id' => array (
            'exclude' => 0,
            'label' => 
'LLL:EXT:px_systems/locallang_db.xml:tx_pxsystems_systems.system_category_id',
            'config' => array (
                'type' => 'select',
                'items' => array (
                    array('',0),
                ),
                'foreign_table' => 'tx_pxsystems_system_categories',
                'foreign_table_where' => 'AND 
tx_pxsystems_system_categories.pid=###CURRENT_PID### AND 
tx_pxsystems_system_categories.sys_language_uid=###REC_FIELD_sys_language_uid### 
ORDER BY tx_pxsystems_system_categories.uid',
                'size' => 1,
                'minitems' => 0,
                'maxitems' => 1,
            )
        ),
        'component_id' => array (
            'exclude' => 0,
            'label' => 
'LLL:EXT:px_systems/locallang_db.xml:tx_pxsystems_systems.component_id',
            'config' => array (
                'type' => 'select',
                'foreign_table' => 'tx_pxsystems_components',
                'foreign_table_where' => 'AND 
tx_pxsystems_components.pid=###CURRENT_PID### AND 
tx_pxsystems_components.sys_language_uid=###REC_FIELD_sys_language_uid### 
ORDER BY tx_pxsystems_components.uid',
                'size' => 10,
                'minitems' => 0,
                'maxitems' => 10,
                "MM" => "tx_pxsystems_systems_component_id_mm",
            )
        ),

As you see, 'system_category_id' is 1:n relation, while 'component_id' is 
m:n relation.

I want to make it possible to create relations to localized related records 
on main record localization - not leave linked records from default language 
version.
So, f.e., if I have "category 1" with "category 1 de" localization in 
'tx_pxsystems_system_categories', and I link "category 1" to my record, then 
I localize the record, and I should see "category 1 de" in "Categories" 
drop-down instead of "INVALID VALUE...". Is it possible out-of-the-box or I 
chould use some hooks to extend core saving mechanism?

Thank you in advance. 



More information about the TYPO3-english mailing list