Jump to:

22998 Posts in 11853 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » How do you stop .ss template from stripping out xml header?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 630 Views
  • fostahgix
    Avatar
    Community Member
    9 Posts

    How do you stop .ss template from stripping out xml header? Link to this post

    Hello everyone,

    I have had this issue before and resolved it by disabling the content negotiator which is now deprecated. Does anyone know how to stop ssviewer.php from stripping out my xml header?

    XmlPage.ss

    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
    <album title="Title" description="Description" lgpath="">
    <img src="{$FLVideo.Link}" />
    </album>
    </gallery>

    Output in firefox:

    <gallery>
    <album title="Title" description="Description" lgpath="">
    <img src="{$FLVideo.Link}" />
    </album>
    </gallery>

    The Issue is its stripping out the xml header so it leaves a whitespace in the spot the header is supposed to be.

    What is the proper way to keep this header in my template?

    Thanks!

  • fostahgix
    Avatar
    Community Member
    9 Posts

    Re: How do you stop .ss template from stripping out xml header? Link to this post

    So I have just removed the header completely and everything works fine now that the first element in my xml document starts on line 1 instead of line 2. I'm not sure if this is an issue or not but this resolved it.

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