Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitecore 7.2 MVC conditional rendering #19

Open
MariaPloscar opened this issue Apr 22, 2015 · 2 comments
Open

Sitecore 7.2 MVC conditional rendering #19

MariaPloscar opened this issue Apr 22, 2015 · 2 comments

Comments

@MariaPloscar
Copy link

I've installed the lastest version of this module (https://github.com/adoprog/Sitecore-Mobile-Device-Detector/releases/tag/4.0) on a Sitecore 7.2 MVC website. For a single page I have to change the rendering for mobile devices only. So I have installed the module, I created a new Device (sitecore/layout/Devices/Mobile) called Mobile.

I have changed the layout presentation for the wanted page with the mobile rendering, and everything is working ok, just that on mobile I got an error for all the rest of the pages, because this new device seems to be applied on the entire website.

If I update the device Mobile item with a single rule: "where the device is mobile rule", then my page will be displayed corectly on mobile devices, but for the rest of the website pages I get "No Layout specified....".

If I update the device Mobile with more than one rule, like "where the device is mobile rule and where the Item ID is equal to {X}", then all the pages will be displayed on mobile devices with the Default device (which is ok), but my specified page will not be displayed with the different rendering for mobile.

Is there any chance I could set up conditional rendering only for a single item? I cannot setup the rules at the /sitecore/system/Settings/Rules/Conditional Renderings/Global Rules level, because we are using MVC and Global conditional renderings don’t work with MVC.
Also I cannot set up this rules on standard values template level, as we are not using sitecore DMS module (Sitecore personalization).

Any suggestions will be appreciated

@HaikoF
Copy link

HaikoF commented Apr 22, 2015

Hi,

first of all try to configure the fallback device in the mobile device to the default device (there is a field called "Fallback device"). If no mobile layout is defined you always fall back to the default layout.
If I got it right this should help you....

BR
Haiko

@MariaPloscar
Copy link
Author

Hi Haiko,

It's working as expected now with the fallback device configured to the default device.

Thank you very much,
Maria Ploscar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants