Skip to content

Instantly share code, notes, and snippets.

@dmulvi
Last active December 29, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmulvi/6da86a05dc83c7a7ab9c to your computer and use it in GitHub Desktop.
Save dmulvi/6da86a05dc83c7a7ab9c to your computer and use it in GitHub Desktop.
Hide (or re-order) subpanels for specific module in SugarCRM 7
<?php
/*
* This example will hide the core notes subpanel on Opportunities detailview.
* In this case it is to allow a custom many-to-many relationship to notes
* to replace the core relationship.
*
* You just need to comment out the subpanel in question and the Quick Repair & Rebuild.
*
* this file is located at custom/modules/Opportunities/clients/base/layouts/subpanels/
* if the file is not in custom directory copy it from core module directory
*
* You can also use this file to hardcode subpanel order by changing the array element order
*/
$viewdefs['Opportunities']['base']['layout']['subpanels'] = array(
'components' => array(
0 =>
array (
'layout' => 'subpanel',
'label' => 'LBL_OPPORTUNITIES_RC_PROPERTIES_1_FROM_RC_PROPERTIES_TITLE',
'context' =>
array (
'link' => 'opportunities_rc_properties_1',
),
),
1 =>
array (
'layout' => 'subpanel',
'label' => 'LBL_CALLS_SUBPANEL_TITLE',
'context' =>
array (
'link' => 'calls',
),
),
2 =>
array (
'layout' => 'subpanel',
'label' => 'LBL_MEETINGS_SUBPANEL_TITLE',
'context' =>
array (
'link' => 'meetings',
),
),
3 =>
array (
'layout' => 'subpanel',
'label' => 'LBL_TASKS_SUBPANEL_TITLE',
'context' =>
array (
'link' => 'tasks',
),
),
/*4 =>
array (
'layout' => 'subpanel',
'label' => 'LBL_NOTES_SUBPANEL_TITLE',
'context' =>
array (
'link' => 'notes',
),
),*/
5 =>
array (
'layout' => 'subpanel',
'label' => 'LBL_DOCUMENTS_SUBPANEL_TITLE',
'context' =>
array (
'link' => 'documents',
),
),
6 =>
array (
'layout' => 'subpanel',
'label' => 'LBL_EMAILS_SUBPANEL_TITLE',
'context' =>
array (
'link' => 'archived_emails',
),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment