Tuesday, December 12, 2006

Using the XSL helper class from your code


Here is an easy way to output an image tag from an image field with possibility to use some new enhancements provided in 5.3.

Sitecore.Xml.Xsl.XslHelper xslhelper = new Sitecore.Xml.Xsl.XslHelper();

string output = xslhelper.image("ImageField", Factory.CreateItemNavigator(Sitecore.Context.Item).Select("."));

Response.Write(output);

0 comments: