How to display an image in an RSS feed transformation

   —   
Syndication web parts use different types of transformations which generate correct syndication syntax. This article provides an example of a transformation which displays an image in an RSS feed.
You can see common syndication transformation functions if you type the following URL:

http://<your_domain>/CMSHelp/index.html?newedit_transformation_methods.htm

Using the above-referenced methods from the Syndication section, you can create a transformation similar to the following, which is used, for example, by Blog post RSS feed.

 <item>
  <guid isPermaLink="false"><%# Eval("NodeGUID") %></guid>
  <title><%# EvalCDATA("BlogPostTitle") %></title>
  <description><%# EvalCDATA("BlogPostSummary") %></description>
  <pubDate><%# GetRSSDateTime(Eval("BlogPostDate")) %></pubDate>
  <description><![CDATA[<img src="<%# GetAbsoluteUrl("~/getattachment/" + Eval("BlogPostTeaser") +"/test.jpg", Eval("SiteName"))%>" />]]></description>         
</item>


If you would like to add an image, you can add a <description> tag, and into this tag insert the image code. See the bold part in the example above.
-it-


See also: Syndication transformation

Applies to: Kentico CMS 6.x
Share this article on   LinkedIn