SugerCRM 5.0 supports defaultly 2 columns in a Panel (can be seen below)
How can we increase the numbers of these columns (I need 4 columns)
Note: 3. and 4. colums in this picture is just dummy (made in PS)
Regards
SugerCRM 5.0 supports defaultly 2 columns in a Panel (can be seen below)
How can we increase the numbers of these columns (I need 4 columns)
Note: 3. and 4. colums in this picture is just dummy (made in PS)
Regards
Last edited by cagatay; 2008-03-27 at 02:17 PM.
Could someone help me? (also help most of Sugar users)![]()
![]()
![]()
Regards
cagatay.
Some time ago I read a post where the forums's member modified the editviewdefs inserting 4 rows at the layout, but when modifying the layout through Studio it shows only the default 2.
So I believe you can do that, but without customize the layout using the Studio.
Cheers
--
André Lopes
Lâmpada Global Services
Rua Bela Cintra, 299 conjunto. 51
São Paulo, SP 01415-000
tel1. 55 11 3237-3110
cel. 55 11 7636-5859
e-mail: info@lampadacrm.com.br
Hi Cagatay -
Similar to your other post, this is technically possible to do but you can't do it in Studio. You would have to modify the editviewdefs.php and detailviewdefs.php files by hand.
Be sure to put customized fields in the proper place in the custom directory to preserve customizations during an upgrade. Also note that you would no longer be able to use Studio with the 4 column layout as it doesn't understand anything but two columns.
To get you started down this path, here is a sample code snipped of two column layout vs a four column layout for ./custom/modules/Accounts/metadata/editviewdefs.php.
The key is the number of fields defined in each array:
Two column layout:
Four column layout:PHP Code:'panels' =>
array (
'Account Information' =>
array (
0 =>
array (
0 =>
array (
'name' => 'name',
'displayParams' =>
array (
'required' => true,
),
'label' => 'LBL_NAME',
),
1 =>
array (
'name' => 'phone_office',
'label' => 'LBL_PHONE_OFFICE',
),
),
1 =>
array (
0 =>
array (
'name' => 'website',
'type' => 'link',
'label' => 'LBL_WEBSITE',
),
1 =>
array (
'name' => 'phone_fax',
'label' => 'LBL_FAX',
),
),
2 =>
array (
0 =>
array (
'name' => 'ticker_symbol',
'label' => 'LBL_TICKER_SYMBOL',
),
1 =>
array (
'name' => 'phone_alternate',
'label' => 'LBL_PHONE_ALT',
),
),
3 =>
array (
0 =>
array (
'name' => 'parent_name',
'label' => 'LBL_MEMBER_OF',
),
1 =>
array (
'name' => 'employees',
'label' => 'LBL_EMPLOYEES',
),
),
4 =>
array (
0 =>
array (
'name' => 'ownership',
'label' => 'LBL_OWNERSHIP',
),
1 =>
array (
'name' => 'rating',
'label' => 'LBL_RATING',
),
),
5 =>
array (
0 =>
array (
'name' => 'industry',
'label' => 'LBL_INDUSTRY',
),
1 =>
array (
'name' => 'sic_code',
'label' => 'LBL_SIC_CODE',
),
),
6 =>
array (
0 =>
array (
'name' => 'account_type',
'label' => 'LBL_TYPE',
),
1 =>
array (
'name' => 'annual_revenue',
'label' => 'LBL_ANNUAL_REVENUE',
),
),
7 =>
array (
0 =>
array (
'name' => 'team_name',
'displayParams' =>
array (
'display' => true,
),
'label' => 'LBL_TEAM',
),
1 => NULL,
),
8 =>
array (
0 =>
array (
'name' => 'assigned_user_name',
'label' => 'LBL_ASSIGNED_TO_NAME',
),
1 =>
array (
'name' => 'testdate_c',
'label' => 'LBL_TESTDATE',
),
),
),
PHP Code:'panels' =>
array (
'Account Information' =>
array (
0 =>
array (
0 =>
array (
'name' => 'name',
'displayParams' =>
array (
'required' => true,
),
'label' => 'LBL_NAME',
),
1 =>
array (
'name' => 'phone_office',
'label' => 'LBL_PHONE_OFFICE',
),
2 =>
array (
'name' => 'website',
'type' => 'link',
'label' => 'LBL_WEBSITE',
),
3 =>
array (
'name' => 'phone_fax',
'label' => 'LBL_FAX',
),
),
1 =>
array (
0 =>
array (
'name' => 'ticker_symbol',
'label' => 'LBL_TICKER_SYMBOL',
),
1 =>
array (
'name' => 'phone_alternate',
'label' => 'LBL_PHONE_ALT',
),
2 =>
array (
'name' => 'parent_name',
'label' => 'LBL_MEMBER_OF',
),
3 =>
array (
'name' => 'employees',
'label' => 'LBL_EMPLOYEES',
),
),
2 =>
array (
0 =>
array (
'name' => 'ownership',
'label' => 'LBL_OWNERSHIP',
),
1 =>
array (
'name' => 'rating',
'label' => 'LBL_RATING',
),
2 =>
array (
'name' => 'industry',
'label' => 'LBL_INDUSTRY',
),
3 =>
array (
'name' => 'sic_code',
'label' => 'LBL_SIC_CODE',
),
),
3 =>
array (
0 =>
array (
'name' => 'account_type',
'label' => 'LBL_TYPE',
),
1 =>
array (
'name' => 'annual_revenue',
'label' => 'LBL_ANNUAL_REVENUE',
),
2 =>
array (
'name' => 'team_name',
'displayParams' =>
array (
'display' => true,
),
'label' => 'LBL_TEAM',
),
3 => NULL,
),
4 =>
array (
0 =>
array (
'name' => 'assigned_user_name',
'label' => 'LBL_ASSIGNED_TO_NAME',
),
1 =>
array (
'name' => 'testdate_c',
'label' => 'LBL_TESTDATE',
),
),
),
Sugar Developer Zone - developer resources | Sugar University - user and admin training
Sugar Docs - user and admin documentation | Sugar Bug Tracker - Enter or view bugs
SugarForge- open source modules, themes, lang packs | SugarExchange - commercial extensions
Clint Oram
Chief Technology Officer and Co-founder
SugarCRM
Just to add to Clint's reply, also be sure to change the 'maxColumns' entry in templateMeta section of the editviewdefs.php or detailviewdefs.php to 3 or 4 or whatever you need. You'll have to do that manually, so save it in custom/<module name>/metadata/ and then you can either go on as Clint detailed to add the extra fields by hand to each row, or you can in fact use Studio from now on.
Studio currently doesn't have a way to make the change from 2 column, but it does read and understand that maxColumns entry. Your layouts in Studio will look a little ugly once you go beyond 2 columns (the third and fourth fields in a row will probably appear below the first and second fields for example), but the drag-and-drops all work, and the layouts are saved correctly. And if you make the maxColumns change first, load the layout in Studio, and then save it, Studio will add the extra fields in for you. It adds them in as emptys with the last added field in a row as a filler, so it will need work, but it may be quicker than adding them in manually.
Of course, this isn't something Studio is intended to do, so your results may vary, but we built the backend to be able to handle it, and I'd like to see it tidied up and made official in a future release - it's not such a big job with the new MVC layouts.
Cheers,
Tom
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks