Jump to:

2001 Posts in 1422 Topics by 615 members

Form Questions

SilverStripe Forums » Form Questions » Switch directionality per instance ?

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

Page: 1
Go to End
Author Topic: 358 Views
  • rob.s
    Avatar
    Community Member
    78 Posts

    Switch directionality per instance ? Link to this post

    when having multiple instances on one page, is it possible to switch the directionality per instance

    E.G.:

    public function getCMSFields() {
       $f = parent::getCMSFields();
       foreach($this->getTranslationFields() as $field) {      
          $title = $field->Title();
          // last 5 characters are respresenting the locale
          // en_GB, de_DE, ar_SA
          $locale = substr($title, strlen($title)-5));
          if( $field instanceof HtmlEditorField && $locale == 'ar_SA' ) {
             // what to do here, to switch the directionality?????
          }
          $f->addFieldToTab("Root.Translations", $field);
       }
       return $f;
    }

    Any ideas would be great !

    358 Views
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.