Hi all.
Just trying to change label in "Root.Content.Main.Title"
class DepartmentPage extends Page {
function getCMSFields() {
$fields = parent::getCMSFields();
$gg = $fields->fieldByName("Root.Content.Main.Title"); // same error with filedByName("Title").
$gg->setTitle("My new Title");
I get this error
Fatal error: Call to a member function setTitle() on a non-object in /public_html/silverstripe/tutorial/code/DepartmentPage.php on line 27
Thanks in advanced.