Friday, August 22, 2014

Device channel panels and web part zones

I recently got the opportunity to create my first mobile device channel. The job seemed pretty straight forward. Create a new mobile master page and add device channel panels to the page layouts. The existing layout in a default panel and the mobile layout in a mobile panel. I instantly ran into a big problem. Device channel panels does not work with web part zones. The reason is that the web part manager knows which web parts should be displayed on a page and in which web part zone. If a web part is registered to a page but the web part zone is unavailable for some reason the web part manager will put that web part in the last available web part zone. This means that if you hide/display different web part zones with device channel panels you will get all web parts from the hidden web part zones in the last displayed web part zone. Well, isn't that just fantastic.

The only solution to this problem I have found is to use a rich text editor instead of a web part zone, but that isn't really the same thing.

Yet another day in SharePoint paradise...