Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba

renameField has no effect


Go to End
Reply


12 Posts   4485 Views

Avatar
Bureau Berg

Community Member, 7 Posts

27 January 2012 at 11:43pm

Working like charm :-) Thanks.

Avatar
Pipifix

Community Member, 56 Posts

16 March 2012 at 5:00am

Hi,

ist much more easier. You dont have to alter the modeladmincode. In your dataobject modell insert the following code.

//Overide the tab labels
static $field_labels = array(
'Content' => 'Other',
'EnglishValue' => 'GermanValue',
);

Known issue: you cannot change 'main' or 'metadata'.

Pipifix

Avatar
botheredbybees

Community Member, 4 Posts

10 May 2013 at 12:09pm

for V3:

$f = parent::getCMSFields();
$f->fieldByName('Root.Main')->setTitle('New Name');

Avatar
neilcreagh

Community Member, 105 Posts

5 May 2015 at 11:57pm

Edited: 05/05/2015 11:58pm

In SS3.1+ this is simply achieved like this

$fields->renameField('Title', 'New Name'); 

Go to Top