Skip to content

Sitecore 7.2 MVC conditional rendering #19

Description

@MariaPloscar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions