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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Editing Label of Content Field in CMS


Go to End


10 Posts   7114 Views

Avatar
FlorianH

Community Member, 33 Posts

24 September 2008 at 6:56pm

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

Community Member, 470 Posts

25 September 2008 at 2:54am

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

Community Member, 33 Posts

30 September 2008 at 2:23am

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

Avatar
Willr

Forum Moderator, 5523 Posts

30 September 2008 at 5:53pm

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

Community Member, 33 Posts

30 September 2008 at 7:45pm

Edited: 30/09/2008 7:47pm

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

Forum Moderator, 5523 Posts

30 September 2008 at 9:04pm

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

Community Member, 33 Posts

1 October 2008 at 2:04am

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

Forum Moderator, 5523 Posts

1 October 2008 at 10:53am

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