Syndication transformations

Syndication web parts render feeds according to transformations. You need to set the Transformation property of each feed web part.

Default transformations

All page types in Kentico have the RSSItem and AtomItem transformations. When you create a new page type, the system generates these transformations automatically.

You can generate the default RSS, Atom and XML transformations when editing transformations of a page type or a custom table. Click next to the Generate default transformation button and select the appropriate format. 

Generating a feed transformation

RSS transformations page type

Additional feed transformations are available in the RSS transformations (CMS.RSSTransformations) page type. This is a container page type used to store RSS transformations for Kentico objects, such as blog comments, board messages, forum posts, media library files and products.

CDATA in feed transformations

If you need to include CDATA sections in your feeds, you can use the EvalCDATA method. This method works in a similar manner as the standard Eval method. The difference is that the retrieved string is wrapped in a CDATA section and all occurences of the ]]> character sequence in the string are escaped.

Escaping is performed by replacing each occurrence of ]]> with ]]]]><!CDATA[> and the whole text is then wrapped in a standard <![CDATA[“wrapped text”]]> enclosure.

The method has two overrides:

  • EvalCDATA(“FieldName”) - specify the name of the retrieved field as the parameter.
  • EvalCDATA(“FieldName”, true) - has one extra boolean parameter, which determines if the wrapping is performed. If the second parameter is false, the value of the field is retrieved, escaping of the ]]> sequence is performed, but the whole retrieved text is not wrapped in the standard <![CDATA[“wrapped text”]]> enclosure.

The second override with the second parameter set to false is particularly useful if you use the method within another CDATA section. Because nesting of CDATA sections is not possible, you only want to have the retrieved string escaped, but not wrapped in the enclosure. The code example below is a transformation extract where the method is used exactly this way.


    <strong><%# EvalCDATA("CommentUserName",false) %></strong><br /><%# EvalCDATA("CommentText",false) %>