Reputation: 243
I am trying to apply my custom rule in two different ways. It is working when I click on personalize button and apply the rule over there but it is not working when I click on the rendering at Presentation -> details -> layout details -> control properties
and enabling the rule on personalization tab over there). I want to know why this method is not working in this case?
Here are more detail about what I am doing:
I am implementing Personalization by using Conditional Rendering. This is a Sitecore 8 solution and both layout and rendering are MVC. I have setup a custom condition code on the Rules Engine (Settings -> Rules). My final rule looks like this on Rule Set Editor:
Rule 1
Where the Parameter country has a value that is equal to sg set data source to Singapore
I also defined a Conditional Rendering Rule under Marketing Center -> Personalization -> Rules
using same custom condition
If I directly apply the rule set on Device Editor by pressing personalization button and configure it there, it works. However it is not working when I enable the conditional rendering rule on control properties. Why?
Edit
Somewhere I read that global rules are not working on MVC components. Is this how it manifests the problem? If this is the case, which areas of Marketing Center will not work on MVC components?
Upvotes: 1
Views: 2144
Reputation: 16990
Rules defined in the Marketing Center and applied via the Control Properties do not work in Sitecore MVC, since they are applied as Global Rules:
Sitecore MVC solutions do not support global conditional rendering rules, which is a form of conditional rendering that applies the same set of rules to all presentation components. You can apply conditional rendering rules for individual presentation components, but you cannot define conditional rendering rules that apply to all presentation components as you can with Web Forms solutions.
You can read more information here: http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2010/10/sitecore-mvc-crash-course.aspx
They continue to work in WebForms implementations. You have to either apply the rules individually or create a workaround to apply the rules in MVC solutions but this could be a bad idea for performance reasons.
Upvotes: 5