Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Problem with HTML formatted output

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1370 Views
  • ml
    Community Member
    1 Post

    Problem with HTML formatted output Link to this post

    Has anyone run into a problem where the output of a wysywig field displays the contents as html entities (eg. </p>) instead of printing regular html? Here's my code:

    Class file:
    function LeftColumn() {
       $data = DataObject::get_one("ProjectsHolder");
       $results = DataObject::get("Page", "FeatureInLeftColumn = 1 AND ParentID = $data->ID", "Title DESC", "", $num);
       return $results;

    <% control LeftColumn %>
    <% end_control %>

    It works fine except $PageTeaser (a wysiwyg field) converts the html in the field to html entities as if it were a code example. The actual data in the field is fine. Any suggestions as to what could be wrong?

  • Fuzz10
    Community Member
    787 Posts

    Re: Problem with HTML formatted output Link to this post

    Have look at the data-type of your field.

    It is probably a Textfield... If so , change it to an HTMLText field.

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.