Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Is it possible to load different transformation for mobile device? View modes: 
User avatar
Member
Member
Giuliano - 3/29/2012 3:46:08 PM
   
Is it possible to load different transformation for mobile device?
Hi,

So in short we want to avoid duplicating content for mobile devices. I''m aware that loading different template is not recommended but I was wondering is it possible to load different transformation for mobile device and how?

This way we could plan our templates differently and use transformation and CSS to display content for mobile devices without duplicating content.

Thanks

User avatar
Kentico Support
Kentico Support
kentico_janh - 3/30/2012 2:08:33 AM
   
RE:Is it possible to load different transformation for mobile device?
Hello,

Absolutly, you can use context macros and K# in the Transformation property to call a different transformation for mobile devices:

if ({%BrowserInfo.IsMobileDevice%}) {
return "MobileTransformation";
}
else {
return "DesktopTransformation";
}


Best regards,
Jan Hermann

User avatar
Member
Member
Giuliano - 3/30/2012 7:41:47 AM
   
RE:Is it possible to load different transformation for mobile device?
Thanks Jan,

This is just what I was looking for. We will experiment with this for our mobile projects until we get mobile templates in Kentico 7.

Have a nice day,
Giuliano