I extended the Page class to define a new ChantierPage with two new CMSFields. Here is the relevant code:
class ChantierPage extends Page {
static $db = array (
'Date' => 'Date',
'Location' => 'Text'
);
static $has_one = array ();
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Location'), 'Content');
return $fields;
}
}
class ChantierPage_Controller extends Page_Controller { }
When I translate a ChantierPage only the default fields (Title, Content) gets translated. My new 'Location' TextField is not shown in the admin page when in translating mode.
But, when I create the translation, new rows are added to the "ChantierPage" table. However there is no reference to those new rows in any SiteTree tables.
Do I have missed a point? What can I do to make this new TextField translation-aware?
Thanks for any help.
Cheers