I created a new extension custom/Extension/modules/Accounts/Ext/LayoutDefs/Notes.php
// new sub panel pointing to the new list view fields
$layout_defs['Accounts']['subpanel_setup']['notes'] = array(
'order' => 5,
'module' => 'Notes',
'subpanel_name' => 'ForHistory',
'override_subpanel_name' => 'FullDescription',
'sort_order' => 'desc',
'sort_by' => 'date_created',
'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
'get_subpanel_data' => 'notes',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
array('widget_class' => 'SubPanelTopSummaryButton'),
This file refers to another custom file FullDescription.php using the ‘override_subpanel_name’ variable.
I placed the FullDescription.php file in “custom/modules/Notes/metadata”, but it isn’t loaded after a Repair and Rebuild.
As far as I know these are the correct locations for the custom files.
Can anyone tell me what I’m doing wrong?
I can’t answer your question, but I can give you the code that works for me in a similar situation. Then you can try to figure it out…
I have this in custom/Extension/modules/Contacts/Ext/Layoutdefs/contacts_contacts_1_Contacts.php
// created: 2015-02-17 04:53:59
$layout_defs["Contacts"]["subpanel_setup"]["contacts_contacts_1"] = array (
'order' => 100,
'module' => 'Contacts',
'subpanel_name' => 'contacts_contacts_1',
'sort_order' => 'asc',
'sort_by' => 'id',
'title_key' => 'LBL_CONTACTS_CONTACTS_1_FROM_CONTACTS_R_TITLE',
'get_subpanel_data' => 'contacts_contacts_1',
'widget_class' => 'SubPanelTopButtonQuickCreate',
'widget_class' => 'SubPanelTopSelectButton',
'mode' => 'MultiSelect',
And then I have a file called custom\modules\Contacts\metadata\subpanels\contacts_contacts_1.php
that contains the array with all the fields,
$subpanel_layout['list_fields'] = array (
Notice I don’t use the override_subpanel_name field. I just use ‘subpanel_name’ and then that string gets used as the file name.
Also, watch out for how these things match the database names, I believe contacts_contacts_1 is also the name if the database table, I’m not sure if my code works only because of that coincidence.
In case of doubt, the way I solve this kind of problems is I step through the code with Eclipse to see where it’s looking for files, and what it’s using to chose the filenames.
I hope this helps.
Thanks, pgr. I’ll give that a try.