Hello,
I'm new here, my name is Claudiu, guys, I have read lots of pages about how to add fields to cms, so far I try this code:
<?php
class Furniture extends Page {
public static $db = array(
'TestField'=> 'Text'
);
public static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField('TestField'), 'Content');
return $fields;
}
}
class Furniture_Controller extends ContentController {}
?>
So I have this page called Furniture and I cant find a way to add that field to that page only, can anyone give me a hint how to do it, please?
Ciao,
Claudiu