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.

Archive

Our old forums are still available as a read-only archive.

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

Editing Label of Content Field in CMS


Go to End
Reply

10 Posts   4753 Views

Avatar
FlorianH

24 September 2008 at 6:56pm Community Member, 33 Posts

Hello there,

I've got a little Question, is it possible to change the label of the Content field shown in the Admin Center? If not, maybe disabling this field would help me too. Thanks in advance

FlorianH

Avatar
Liam

25 September 2008 at 2:54am Community Member, 470 Posts

This doc page shows you how to remove and rename fields. This can be applied to all, not just content.

http://doc.silverstripe.com/doku.php?id=getcmsfields&s=removefieldfromtab

Avatar
FlorianH

30 September 2008 at 2:23am Community Member, 33 Posts

This method doesn't exist anymore, I get an error and the API Doc doesn't list it.

Avatar
Willr

30 September 2008 at 5:53pm Forum Moderator, 5511 Posts

You using trunk? I know its in trunk as Im using it :P and I would assume its in 2.2.2 as well.

It is in the docs - http://api.silverstripe.com/forms/fields-structural/FieldSet.html

Avatar
FlorianH

30 September 2008 at 7:45pm (Last edited: 30 September 2008 7:47pm), Community Member, 33 Posts

No I'm using 2.2.2 currently, since trunk won't work for me (http://www.silverstripe.com/site-builders-forum/show/179914)

I don't see it in the doc, searched with Firefox for "renameField".

Object::__call() Method 'renameField' not found in class 'FieldSet'

Avatar
Willr

30 September 2008 at 9:04pm Forum Moderator, 5511 Posts

Yea rename field might only be in trunk sorry, But what you can do is remove the field then re add it

$fields->removeByName('Content');
$fields->addFieldToTab("Root.Content.Main", new HTMLEditorField("Content", "My New Label"));

Avatar
FlorianH

1 October 2008 at 2:04am Community Member, 33 Posts

Still doesn't work, a message box pops up with "There has been an error" when I select the site in the CMS.

Avatar
Willr

1 October 2008 at 10:53am Forum Moderator, 5511 Posts

Can you find out what the error is? If you have Firebug for firefox installed you should view under the 'console' view in firebug you should see all the requests. Click on the little arrow next to the failing request (it will be red), click the load response button and it should show you a more useful error

Go to Top