How to remove subpanel manually

Hello guys, I am removing some subpanels in a custom module manually (layoutdefs.ext.php), however when I make any changes related to the module the configuration returns, how can I define this definitively?

Hello,
You should not change in the files of ext.php as those are extension files that are merged from the directory custom/Extension/modules/Ext . So whenever you do Quick repair and rebuild. It will remove your changes.
Instead you have to change files at custom/Extension directory for layout ,vardefs etc…
If you want to remove subpanel manually.
Create a new custom php file and at custom/Extension/modules//Ext/Layoutdefs/
and add code.

unset($layout_defs[‘MODULENAME’][‘subpanel_setup’][‘NAMEOFSUBPANEL’]);

Then do a quick repair and rebuild.

thank you friend, i will follow these steps, i hope it solves my problem. :slight_smile:

Hello,
Thank you @sagarjaydeep for giving the solution. I try this but did not work. I hope your given solution is for SuiteCRM 8.
If your solution is not for SuiteCRM 8 can you please guide us on how to do it on SuiteCRM 8?

Hello All,

I found the solution. To overwinter layout variable in SuiteCRM 8.

  • To change the Subpanel in the list view
  • Create or edit file layoutdefs.ext.php in /public/legacy/custom/Extension/modules/{{module_name}}/Ext/Layoutdefs/ folder
  • E.g. ==> /public/legacy/custom/Extension/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php

And unset whatever you want to hide:
unset($layout_defs['Accounts']['subpanel_setup']['bugs']); unset($layout_defs['Accounts']['subpanel_setup']['contacts']);

1 Like