Question

Our Orchard site has 2 themes, one for the desktop site and another for the mobile site. We created the desktop site first and have added many widgets to the Content zone. When we introduced the mobile site we didn't want to render the majority of the widgets in the Content zone so we created a new zone, MobileContent, to be the main content area for the mobile theme. That way we can start from scratch and add only the widgets we need.

This has all been working well for us up until we wanted to implement our own NotFound view in the mobile theme. The NotFound view will render itself in the Content zone so I posted the question Is there a way to change the zone of the LogOn and NotFound view and a comment was made suggesting I keep the Content zone.

So my question is, is it possible to render widgets only in certain themes? Or perhaps there is another way I can keep the Content zone but not have the mobile site render the widgets intended for the desktop site.

Était-ce utile?

La solution

Yes, you can choose to include or exclude zones from the layout template of your theme. That's one way to do it, but it won't work for the Content zone, as this one is pretty central. Another would be to have layer rules that rely on the same logic that selects your theme. That would be the cleaner approach.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top