edit subpanel label

Hi there,

is it not possible to rename labels of subpanels in studio? If I go to studio > accounts > subpanels > opportunities and edit a field it only lets me edit width, not the label?

Can this be done manually in the code somewhere? Can someone point me in the direction of the correct file?

many thanks

Hi,

to change the title of the subpanel:
[ul]
[li]go to Admin / Studio / / Labels
[li]find a label like LBL_CONTACTS_SUBPANEL_TITLE and change it, save
[/ul]

to change the column headers of the subpanel:

  • go to Admin / Studio / / Relationships
  • click on the respective relationship
  • make a note of "Subpanel from "
    [li]make a copy of the following file ( ist the name of the subpanel you just made a note from, if empty, it is ‘default’)
modules/<childmodule>/metadata/subpanels/<subpanelfrom>.php

to (create directory if it doesn’t exist)

custom/modules/<childmodule>/metadata/subpanels/<subpanelfrom>.php

[/li]- edit the copy, find the column headers in ‘list_fields’
[li]if it has an entry ‘vname’ then make a note of this, if not, then add an entry ‘vname’ and pick a name for it, for example for salutation ‘LBL_LIST_SALUTATION’
For example:


  'salutation'=>array(
                        'name'=>'salutation',
                        'usage' => 'query_only',
                ),

becomes


  'salutation'=>array(
                        'name'=>'salutation',
                        'usage' => 'query_only',
			'vname' => 'LBL_LIST_SALUTATION',
                ),

[/li]
[li]edit the following file (create it and it’s directory, if it doesn’t exist)

custom/modules/<childmodule>/language/en_us.lang.php

[/li]
[li]if created, add the following (replace LBL_LIST_SALUTATION with the name you picked)


<?php
$mod_strings = array (
	'LBL_LIST_SALUTATION' => 'My super Salutation header text',
);

If the file already existed, only add the line LBL_LIST_SALUTATION[/li]
[li]if you use SuiteCRM in other languages than english, then

  • adapt the heading text under Admin / Studio / / Labels
  • Select the language
  • modify the label which should now be listed here
    [/li]
    [/ul]
2 Likes

Awesome, thank you.

With the information I was able to find the correct string, I already had ‘LBL_SALES_STAGE’ in the lang.php file but I needed ‘LBL_LIST_SALES_STAGE’