Table of Contents Previous Next

Sugar Developer Guide

Version 5.1


Chapter 3 Module Framework : Subpanels : Layout Defs

Layout Defs
This is the file that contains the related modules to create subpanels for. It is stored in the $layout_defs array $layout_defs[<module>]['subpanel_setup'][<related_module>].
This example is from the account metadata/subpaneldefs.php
'contacts' => array(
'order' => 30,// the order in which this subpanel is displayed with other subpanels
'module' => 'Contacts',
'subpanel_name' => 'default', // in this case, it will use ./modules/Contacts/subpanels/default.php
'get_subpanel_data' => 'contacts',
'add_subpanel_data' => 'contact_id',
'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
'top_buttons' => array( // this array defines the top buttons
array('widget_class' => 'SubPanelTopCreateAccountNameButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
),
),
In the language file for the module containing the subpanel, the following values need to be added.
In the example, it would be $mod_strings['LBL_CONTACTS_SUBPANEL_TITLE'] = 'Contacts';
In the example, it would be $mod_strings['LBL_CASES'] = 'Cases';

Table of Contents Previous Next

Copyright 2004-2008 SugarCRM Inc.
Product License