Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Template for external data source View modes: 
User avatar
Member
Member
Brad R - 4/8/2011 1:19:46 PM
   
Template for external data source
As part of evaluating whether or not to port an existing application to Kentico, I would like to use a data source Web part to perform a query on an external database (from the existing application) and then use transformations to display it.

If I understand correctly, I need to place the data source on the page and then a basic repeater. I then set what transformation to use on the basic repeater.

My question is, where do I define the transformation? Were I using a custom table (something else I'm looking into), then I would set it in the properties for the custom table. Or, similarly, if it were a document type (the data being stored would be inefficient to store as a document), then I would set it under the document properties. The problem here is that I don't have any such "nice" place to put the template. I'm considering creating a dummy document type just to store templates for this purpose. Is there another way?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 4/12/2011 11:00:52 AM
   
RE:Template for external data source
Hello,

What you are suggesting in the end - using dummy document type - is the preferred way to do this now.
You can see an example of this for E-commerce or Community modules ... there are document types solely for the purpose of transformations, even named with suffix "-transformations". They do not use any existing documents.

All you need to specify in the repeater is the codename of that transformation (<dummy doctype codename>.<transformation name>)

It's even possible to use macros for "transformation" repeater webpart property - like {%classname%}.default - which allows you to use appropriate transformation for different document types (data types) displayed simultaneously...

Regards,
Zdenek