1

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?

Behrooz
  • 243
  • 2
  • 14
  • Please, make sure that your rule is present on "Final Layout" tab. Probably you setup it on "Shared Layout", but something override it on "Final Layout". – Anton Apr 14 '16 at 09:16
  • Thank you reminding me this however it didn't work. – Behrooz Apr 14 '16 at 09:52

1 Answers1

5

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.

jammykam
  • 16,940
  • 2
  • 36
  • 71
  • sigh :( Thank you for explaining this. The reason why I wanted to use Marketing Center rules was the fact that I don't want my content editor mess with Component Presentation settings. I want them to play with rules on Marketing Center only. How else I could do that if I wanted to limit the scope of rule to just this particular component? – Behrooz Apr 14 '16 at 10:04