7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » How to use TranslatableDataObject.
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 250 Views |
-
How to use TranslatableDataObject.

25 January 2013 at 5:44am
If myobject fields code is something like this:
public function getCMSFields_forPopup()
{
return new FieldSet(
new DropdownField('Status','Status',singleton('Product')->dbObject('Status')->enumValues()),
new TextField('ProductName', 'Product Name'),
new SimpleWysiwygField('Description', 'Description'),
new TextField('Price', 'Price'),
new ImageField('Photo', 'Product photo'),
new FileIFrameField('Manual', 'Product manual')
);
}
where i put then theforeach($this->getTranslationFields() as $field) {
$f->addFieldToTab("Root.Translations", $field);
}
do i have to add it to the page controling the dataobject? -
Re: How to use TranslatableDataObject.

25 January 2013 at 6:07am Last edited: 25 January 2013 8:15am
after adding
TranslatableDataObject::register('Product', array(
'ProductName',
'Description'
));
it made the field tables for mysql but i cant find the place to edit them in cms
| 250 Views | ||
|
Page:
1
|
Go to Top |

