Monday, September 6, 2010

Sitecore Fetch Squad

Automated crawler fetching websites and blogs from Sitecore content

Manually using Sitecore XSLT Renderings

Crawled: On December - 29 - 2008 Source

If you want a simple way to get the output from an XSLT Rendering using Sitecore in code use the following:

    Sitecore.Web.UI.WebControls.XslFile file = new Sitecore.Web.UI.WebControls.XslFile();
    file.Path = "/xsl/MyRendering.xslt";
    string output = file.RenderAsText();

This will give you the output of the rendering as a single string that you can then use for any purpose.One thing that would be really cool would be to create XSLT on the fly and feed it into this XslFile control. If I work this out I will let you know.

Mike’s Blog

Comments are closed.