thanks for reply
I have fixed all my issue
There are a few differences between the guide and my finally working case:
Building SELF module one-to-many relationship:
- For appear subpanel need to add the relationship definition to
custom/Extension/modules/SELF/Ext/Vardefs/SELF_SELF_1_SELF.php
$dictionary["SELF"]["relationships"]['SELF_SELF_1'] = array(
'lhs_module' => 'SELF',
'lhs_table' => 'SELF',
'lhs_key' => 'id',
'rhs_module' => 'SELF',
'rhs_table' => 'SELF',
'rhs_key' => 'id_SELF', // UPD: I just reverse SELF_id to id_SELF for my self wish, it's not important
'relationship_type' => 'one-to-many',
);
For one-to-many relationship between two different module
Current guide steps have not good due to broken subpanel “select button” functional
Main issue was in Module name order, I just swap values between LHS_module/table and RHS_module/table, and LHS_key - RHS_key
To fix need a little change this code:
$dictionary["organizations"]["relationships"]['organizations_experience_1'] = array(
'lhs_module' => 'organizations', // -> here need place Main module
'lhs_table' => 'organizations',
'lhs_key' => 'id', // -> here need place 'Id'
'rhs_module' => 'experience', // -> here need place Relate module
'rhs_table' => 'experience',
'rhs_key' => 'id_organization', // -> here need place your defined column, in my case it's 'id_organization'
'relationship_type' => 'one-to-many',
);
For fixing many-to-many relationship field names
Make sure you have the same file in Vardefs on both module sides, if not that just copy
custom/Extension/modules/FirstModule/Ext/Vardefs/FirstModule_SecondModule_1.php
custom/Extension/modules/SecondModule/Ext/Vardefs/FirstModule_SecondModule_1.php