|
||
This dialog opens either when creating a new document type transformation or editing an existing one.
The following actions are available in the header:
• Save - click this button to confirm the creation of a new transformation or changes made to an existing one.
• Check out - locks the transformation, so that other users cannot modify it at the same time. After you finish your edits, you can allow other users to modify the transformation again using the Check in button or you can cancel the checkout by clicking Undo checkout.
• Generate default transformation - generates a default transformation for the parent document type. This overwrites the current transformation code.
• Preview - allows you to edit the transformation side-by-side with a preview of how it appears on the live site. See the Design preview help topic for additional details about the preview mode.
Specify the content of the transformation through the following fields:
General |
|
Transformation name |
The name of the transformation. This is used together with the code name of the parent document type when assigning the transformation to web parts or controls. |
Transformation |
|
Transformation type |
You can choose from the following code syntax options, which determine how the system renders the transformation:
•ASCX - with this option, the code of the transformation supports 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. You can access the fields of the transformed document through standard data binding expressions in format: <%# Eval("ColumnName") %>
•Text/XML - the system processes the code only as basic HTML. This means that any ASCX markup, such as controls or inline code, are not 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:
•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 - these transformations provide a way to define the jQuery templates used by the Chat module.
|
Code |
This is the actual code of the transformation. The code is processed according to the selected Transformation type.
See the Methods in transformations help topic for examples of expressions that you can use in your transformations. |
Transformations allow you to directly define any CSS classes used within the code.
Requirement: The Allow CSS from components setting must be enabled in Site Manager -> Settings -> System -> Performance.
1. Click Add CSS styles below the transformation's code. The CSS styles editor appears.
2. Enter the definitions of the required CSS classes.
3. Click Save.
All pages where this transformation is used to display data (e.g. through a viewer web part) automatically load the specified styles.
•Developer's Guide -> Development -> Document types
•Developer's Guide -> Development -> Document types -> Transformations
•Developer's Guide -> Development -> Team development -> Object locking
•Developer's Guide -> Development -> CSS stylesheets and design -> CSS for page components