Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » [Solved] Question about automatic & created

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

Page: 1
Go to End
Author Topic: 530 Views
  • Graphicator
    Avatar
    Community Member
    62 Posts

    [Solved] Question about automatic & created Link to this post

       public function Title(){
          $replace = $this->Title;
          $replace = str_replace(' ',' ',$replace);
          
          return $replace;
       }

    I am trying to display titles without being split.

    What I get however, is the actual   showing up and not turned to html.

  • Graphicator
    Avatar
    Community Member
    62 Posts

    Re: [Solved] Question about automatic & created Link to this post

    $Title.RAW

    Achieves the issue I was having

  • Graphicator
    Avatar
    Community Member
    62 Posts

    Re: [Solved] Question about automatic & created Link to this post

    I'm taking down the [Solved] on the title, because this function produces quite a mess everywhere. In the backend, I still see "ampnbs" everywhere because I cannot program in {Title.RAW} everywhere the DataObject column shows up.

    However....

    I just switch the function to

    public function Title2RAW(){...

    and in the calling page

    $Title2RAW.RAW

    Cheers!

    530 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.