Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » How to use TranslatableDataObject.

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 478 Views
  • Webdoc
    Community Member
    332 Posts

    How to use TranslatableDataObject. Link to this post

    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 the

    foreach($this->getTranslationFields() as $field) {
    $f->addFieldToTab("Root.Translations", $field);

    do i have to add it to the page controling the dataobject?

  • Webdoc
    Community Member
    332 Posts

    Re: How to use TranslatableDataObject. Link to this post

    after adding
    TranslatableDataObject::register('Product', array(
    it made the field tables for mysql but i cant find the place to edit them in cms

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.