What he means is create a file, then add the contents quoted (but changed to your own modules/subpanels.)
Doddsy has just chosen a slightly odd wording is all, by saying to create a file (that is empty, which is true of almost all newly created files) and then to put the contents inside of it.
Once a module hads been customised with âStudioâ (adding a field usually), a number of files then appear in the âCustomâ directory under a folder with that modules name.
That of course makes your changes upgrade proof, as the customisations are kept separate from the core files.
If you have no need for an additional field, then just donât display it in any layout.
But that will trigger the creation of the files to work with in the Custom Directory.
Aha, I get you now. Unfortunately, the ones I have left are Activities and History, which actually donât appear as subpanels but I guess are somehow autogenerated in the Project module.
So, I went a totally different route, went into suitecrm/modules/Project/metadata and edited subpaneldefs.php. I just commented out the lines for the subpanels I didnât want and blammo. I have no idea if this was a good idea, but it worked.
What you did is completely upgrade UNsafe. You modified the files that will be overwritten upon any upgrade. You need to change all your files in the suitecrm/custom directory.
Put your changes into suitecrm/custom/modules/Project/metadata/subpaneldefs.php
Restore the original suitecrm/modules/Project/metadata/subpaneldefs.php
I know that, but using the safe method just straight up didnât work, especially with Activities and History (which donât count as actual subpanels). Also, suitecrm/custom/modules/Project/metadata/subpaneldefs.php doesnât exist. Iâve tried going through Ext/Layoutdefs but to no avail.
Iâm a little surprised that you guys are talking about the metadata folder, as Iâve never used it.
I would have thought the fodler is /custom/Extension/modules/project/Ext/Layoutdefs
My custom module is in /custom/Extension/modules/CER_ClientEquipment/Ext/Layoutdefs
And of course the act of building a custom module creates all of the files except the âcustom.phpâ which is the one I made (from information on this post, definitely didnât think of it myself B) B) ). Itâs only the permanent modules that you have to customize in studio to create the module folder in the âCustomâ directory. (My apologies if that caused confusion earlier). Custom modules should already be there.
Good luck with your changes & itâs not that much work to modify your file again after upgrades. Iâm glad you got it working.
Just to reduce confusion for the next person, a photo of my directory structure with the custom.php file is attached.
-rwxrwxrwx 1 www-data www-data 401 Jan 16 12:25 custom.php
-rwxr-xr-x 1 www-data www-data 575 Jan 16 12:25 layoutdefs.ext.php
layoutdefs.ext.php
<?php
//WARNING: The contents of this file are auto-generated
//auto-generated file DO NOT EDIT
$layout_defs['Accounts']['subpanel_setup']['contacts']['override_subpanel_name'] = 'Account_subpanel_contacts';
//auto-generated file DO NOT EDIT
$layout_defs['Accounts']['subpanel_setup']['account_aos_contracts']['override_subpanel_name'] = 'Account_subpanel_account_aos_contracts';
//auto-generated file DO NOT EDIT
$layout_defs['Accounts']['subpanel_setup']['products_services_purchased']['override_subpanel_name'] = 'Account_subpanel_products_services_purchased';
?>
when I run a âQuick Repair and Rebuildâ I dont see the subpanels being removed. I also wanted to mention I renamed Accounts module to Organizations.
-rwxrwxrwx 1 www-data www-data 401 Jan 16 12:25 custom.php
-rwxr-xr-x 1 www-data www-data 575 Jan 16 12:25 layoutdefs.ext.php
layoutdefs.ext.php
<?php
//WARNING: The contents of this file are auto-generated
//auto-generated file DO NOT EDIT
$layout_defs['Accounts']['subpanel_setup']['contacts']['override_subpanel_name'] = 'Account_subpanel_contacts';
//auto-generated file DO NOT EDIT
$layout_defs['Accounts']['subpanel_setup']['account_aos_contracts']['override_subpanel_name'] = 'Account_subpanel_account_aos_contracts';
//auto-generated file DO NOT EDIT
$layout_defs['Accounts']['subpanel_setup']['products_services_purchased']['override_subpanel_name'] = 'Account_subpanel_products_services_purchased';
?>
when I run a âQuick Repair and Rebuildâ I dont see the subpanels being removed. I also wanted to mention I renamed Accounts module to Organizations.
In this file you will unset the subpanels for the module, so forexample is i want to Hide documents subpanel in Accounts. i will have the content
unset($layout_defs[âAccountsâ][âsubpanel_setupâ][âdocumentsâ]);
I need to add custom module to Activities subpanel top button, so I edit custom/module/Accounts/metadata/subpaneldefs.php, but it does not work, I edit in module/Accounts/metadata/subpaneldefs.php that it work