Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bogdan 250 posts 427 karma points
    Oct 19, 2009 @ 11:29
    Bogdan
    0

    Clear page from xslt macro

    Hi,

    Is it possible to clear all page content from an xslt? I've tried to call Response.ClearContent(); from a C# script inside an xslt, but it doesn't work. What I'm trying to do is add a get parameter to the page that when true the page outputs xml, when false or not set outputs the html as usual. Is it possible to achieve this from xslt, do I have to make a user control or is there another way?

  • Edward Dudley 80 posts 121 karma points
    Oct 19, 2009 @ 12:12
    Edward Dudley
    0

    Maybe you could use alternative templates - one to render HTML and one to render XML?

    See: http://www.nibble.be/?p=42 for more info.

    I guess you already know about changing the MIME type to XML with Umbraco Utilities?

  • Bogdan 250 posts 427 karma points
    Oct 19, 2009 @ 12:43
    Bogdan
    0

    Edward, that's a very good idea, thank you!

     

Please Sign in or register to post replies

Write your reply to:

Draft