markcoatsworth
-
5/9/2013 4:32:12 PM
Device Layouts question
Hello,
We have a client who wants to display some pages from their Kentico 7 site in a Facebook iframe application. So we need to create an alternate layout for these pages that is almost the same as the main layout, but optimized to the size of the iframe.
It seemed like using Device Layouts was a perfect solution to this problem. Our plan was create a device profile called 'Facebook', and this profile could use a macro to look for a query variable at the end of the URL. Then we append a variable like ?source=facebook to all of our Facebook requests -- this variable triggers the device profile -- and then we can see the device layout.
But it didn't work. Our other developer emailed the Kentico support team, and they said that device profiles must match a device in the ~/App_Data/CMSModules/DeviceProfile/devices.xml file before it evaluates the macro. This basically makes it impossible to use. Sure, I could add a new device with a user agent that adds my desktop browser. But the next time that Chrome and Firefox issue updates, then the user agent changes, and it won't match anymore.
Do you have any other suggestions how we could do this? Is there a way with the API that I could force a page to use a device layout before it is rendered? Please let me know,
Mark
|