Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > JQuery Transformation Type? View modes: 
User avatar
Member
Member
CJennings - 5/23/2012 11:17:33 AM
   
JQuery Transformation Type?
In Kentico 6, there's a new type of transformation: jQuery. The documentation doesn't provide much information about it, and I was wondering where I could find more details.

For reference, the documentation simply states:

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

This doesn't explain why I would use it over text/XML or html...

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 5/26/2012 1:37:11 PM
   
RE:JQuery Transformation Type?
The jQuery transformation type allows you to use the jQuery transformation #{ColumnName} syntax to access properties of a document while still being able to use the {%%} syntax for Kentico specific macro expressions. This way you can create transformations that will work for both client side jQuery and server side Kentico.

The instances where you might use this are probably slim to none, but it is a nice feature to have if you like to use jQuery and AJAX to load markup into the DOM.

I believe the reason they added this type was to make it so you don't have to create/edit 2 transformations and to allow you to access the transformation through the API to output into your code for use with jQuery. It helps to make it backwards compatible with the current viewer controls that don't let you select 1 transformation for server-side and 1 for client-side code. You can essentially just say "Use this jQuery type template that will work the same with the MacroResolver as it will with jQuery's transformation parser".

Does that help answer your question?



User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 5/26/2012 1:39:41 PM
   
RE:JQuery Transformation Type?
Just an added note. It might also be provided so that you can just copy/paste a transformation that you've already written for jQuery without having to make changes to it. This is especially time-saving when you're developing them initially and testing them out.

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 5/27/2012 4:22:55 AM
   
RE:JQuery Transformation Type?
Hello.

I am afraid we don’t have more information regarding this topic in our documentation, or some particular example. However, it says that you should use this transformation type when you want to resolve jQuery templates. So, it is just an option for you if you want go with these jQuery template. Otherwise, you can use any other transformation type which fits your needs, usually the default one. More info about jQuery templates can be found online, e.g. here, as this is jQuery related technique.

Best Regards,
Radek Macalik