Hi,
hope youāre well.
I want to hide the projects sub panel on the contacts module.
Iāve been trying to follow the instructions on a thread but not getting any results.
Can you please advise whether the instructions below still apply to the latest version.
cheers
Craig
btw.

think Iām just being stupid.
Iām creating a file. mycustom.php. with just one line in it : unset($layout_defs[āContactsā][āsubpanel_setupā][āprojectsā]);
putting it in the directory indicated, but no joy.
=================
Previous instructions from an old thread areā¦
to hide or remove sub panel
You have to add a new custom php file in
/custom/Extension/modules//Ext/
if you want to remove campaign subpanel from Leads module, add a mycustom.php in
/custom/Extension/modules/Leads/Ext/
with unset () function
unset($layout_defs[āLeadsā][āsubpanel_setupā][ācampaignsā]);
Then repair extensions, tour code will be added to
custom/modules//Ext/Layoutdefs/layoutdefs.ext.php
Try replacing your code with:
unset($layout_defs['Contacts']['subpanel_setup']['projects']);
(note the lowercase letters in āprojectsā)
or with:
unset($layout_defs['Contacts']['subpanel_setup']['contacts_projects']);
(sorry I give you two options but I havenāt tried it so I am not 100% sure which should work).
Then run Quick repair and rebuild.
Before doing anything I strongly recommend that you take a full backup of your whole SuiteCRM instance, including the database, or that you try applying these changes on a test instance that may be completely discarded.
Hi,
Thanks for responding. Greatly appreciated. Iāve tried the suggestions and still no joy. There are 3 directories in Ext (language, layoutdefs, vardefs). Have put the file in various locations and no change. Checked the relationship names and they are right. Also tried on a different module and is the same.
Any ideas what Iām doing wrong???
The directory in which you should put your file is:
custom/Extension/modules/Contacts/Ext/Layoutdefs/HideProjects.php
(The name of the file āHideProjects.phpā is a name I invented. In therory you can name it the way you want. I have seen it being called also ālayoutdefs.ext.phpā).
Once done Run Quick Repair and Rebuild
Hi,
Hope youāre well. Thanks again for responding. Still not working, something else must be happening⦠I have put the file in the extensions area. with the code to remove documents
"unset($layout_defs[āContactsā][āsubpanel_setupā][ādocuments_contactsā]); "
I run repair and check the module folder. in the ext layouts folder of contacts I can see a file ālayoutdefs.ext.phpā
The line above is in this file. The php is being found and the repair is updating the correct area yet the line above is not having any impact
Confused. Any ideas?
if you look inside the following file:
modules/Contacts/metadata/subpaneldefs.php
You will find towards the end the definition of the Projects subpanel:
$layout_defs['Contacts'] = array(
// list of what Subpanels to show in the DetailView
'subpanel_setup' => array(
...
...
...
'project' => array(
'order' => 110,
'module' => 'Project',
'sort_order' => 'asc',
'sort_by' => 'name',
'get_subpanel_data' => 'project',
'subpanel_name' => 'default',
'title_key' => 'LBL_PROJECTS_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect'),
),
),
...
...
therefore you have to unset:
$layout_defs['Contacts'] ['subpanel_setup' ]['project']
(sorry, before I put the extra letter āsā)
You can also try to comment the lines related to āprojectā inside this file (not upgrade safe though) just to see what happens (take a back up before).
1 Like