I'm using silverstripe version 3.1
I tried to add to each DataObject a translation. For that I've used the following module: https://github.com/bummzack/translatable-dataobject
I would like to have a modeladmin which uses a dataobject in 3 languages. (German, French and English - 3 Tabs)
private static $db = array(
'Title' => 'Varchar(200)'
);
public function getCMSFields() {
$fields = new FieldList();
$fields->add($this->getTranslatableTabSet());
$fields->removeByName("URLSegment");
return $fields;
}
How can I add
new TextField('Title', 'Titel *', '', 20)
in order to be able to define for example the limit of characters of 20?
This example didn't work for me. Only a blank site is shown in the CMS:
public function getCMSFields() {
$fields = new FieldList(
new TextField('Title', 'Titel *', '', 20)
);
$fields->add($this->getTranslatableTabSet());
$fields->removeByName("URLSegment");
return $fields;
}
Any ideas what I did wrong? Thank you