Kentico CMS 6.0 Context Help

New/Edit transformation

New/Edit transformation

Previous topic Next topic Mail us feedback on this topic!  

New/Edit transformation

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

On this tab, you are either creating a new document type transformation or editing an existing one. If you want to use an external editor to edit the transformation, use the CheckOut Check out to file link to check out the transformation to a file on your local disk.


For each transformation, you can enter the following:


Transformation name

The name of the transformation.

Transformation type

You can choose from the following code syntax options, which will determine how the transformation is rendered:


ASCX - with this option, the code of the transformation will support ASCX markup, i.e. the same syntax that you would use to edit a standard web form or user control, including inline code and embedded controls. The fields of the document can be accessed through standard data binding expressions in format: <%# Eval("ColumnName") %>
Please note that for security purposes, ASCX transformations may only be edited by users who have the Edit ASCX code permission for the Design module.


Text/XML - the code will only be processed as basic HTML. This means that any ASCX markup, such as controls or inline code, will not be functional when the transformation is rendered. You may use Kentico CMS Macro expressions and methods to insert dynamic values into the content. Use expressions in the following format to get the values of the document's fields: {%ColumnName%}


HTML - works the same way as the Text/XML option, but editing is done through the WYSIWYG editor. The rendered output of HTML code will be shown inside the editor.


XSLT - this option can be selected for transformations that use XSL elements to render the data. The code must be in valid XML format.


jQuery - works the same way as the Text/XML option, while these transformations are used when resolving jQuery templates.


This is the actual code of the transformation. The code will be processed according to the selected Transformation type.

Generate default transformation

Using this button, you can generate a default transformation for the currently edited document type.


ASCX transformations allow you to change the type of the generated transformation using the drop-down list next to the button:


Default - standard ASCX transformation.

RSS - transformation which transforms documents into the RSS feed format.

Atom - transformation which transforms documents into the Atom feed format.

XML - transformation which transforms documents into general XML feed format.

CSS styles

This field becomes available if you click the Add CSS styles link below the transformation's code editor.


Here you can define any CSS classes used within the code of the transformation. The specified styles will be loaded by pages where this transformation is used to display data (e.g. through a viewer web part). Please note that this requires the Allow CSS from components setting to be enabled in Site Manager -> Settings -> System -> Performance.


For more information about CSS styles of page components, please see the Development -> CSS stylesheets and design -> CSS for page components topic in the Developer's Guide.


Examples of expressions which can be used in your transformations can be found here. More information on writing transformations can be found in the Writing transformations topic of the Kentico CMS Developer's Guide.


Detailed information about document types and transformations can be found in Developer's Guide -> Development -> Document types.