Extend normal website with mobile version with same data

Topics: General, Troubleshooting, Writing modules
Apr 19, 2012 at 7:42 AM
Edited Apr 19, 2012 at 9:35 AM

We've (our company) have built quite a big community website in Orchard and now we have to create also a separate mobile website for this community.

I know it is possible to switch themes (http://gallery.orchardproject.net/List/Modules/Orchard.Module.Contrib.Mobile) dynamically but is it also possible to create a total new widget schema for this theme/mobile website?

Or is the only nice solution creating a separate tenant and share the data with for example a wcf service?

Has anyone else tried this before? We want to create a different structure for the mobile version compared to the normal desktop version. Thanks!

Coordinator
Apr 19, 2012 at 7:45 AM

It would be easy to build a rule for widget layers that is based on user agent. There may even be one already. If not, it could be adapted from the code in Contrib.Mobile or in Vandelay Industries.

Apr 19, 2012 at 8:00 AM

Ok thanks for the suggestion but I'm afraid it could become quite messy when all these widgets and layers are mixed together. Maybe it's an idea to make it possible (int future Orchard version) to create a separate widget schema for the available themes? Or are there are other plans/ideas about this problem?

Coordinator
Apr 19, 2012 at 8:02 PM

No, that is *exactly* what layers are for. What you call "schema", we call "layer".

Aug 23, 2012 at 9:45 AM
Edited Aug 23, 2012 at 11:13 AM

I feel I have the same questions/issues as Znowman. 

From the picture of your "Theme picker" (http://gallery.orchardproject.net/List/Modules/Orchard.Module.Vandelay.ThemePicker) it seems like you have chopped of some of the sites content when displaying it on a phone (for instance the menu). I've would like to do the same, show less content/widgets when the user uses a phone.

What is the right way to solve this?

-Is it to create a new layer with a "not mobile" layer rule and add the menu, ad-banner and such to that layer? (if this is the answer how do I make such a rule)

-Or should I create a new theme (phone theme) that does not contain the zones that I do not want to be displayed on the phone.?

Coordinator
Aug 27, 2012 at 7:40 AM

Both ways will work. First one is probably nicer and less work.