The only thing that left uncovered by the module was GeoIP and visit-related stuff. How would you test the following rules before?
In order to make it easier, I’ve updated “Persona Changer” recently. Now it is possible to define rules that will be active for selected persona. And it will work for all kinds of personalization rules, even your custom ones. I tried to keep it simple, so only add 2 additional fields were added to the “Persona” template:
“Active Rules” field defines rules that will be always active for current persona.
“Disable Other Rules” field allows you to turn off processing rules by Sitecore, in order to avoid possible collisions (it’s unlikely that they will occur).
After update, module will substitute “InsertRenderings” processor to execute custom rules (it is only active in Preview mode and when persona is selected).
if (!Context.PageMode.IsPreview || ID.IsNullOrEmpty(PersonaHelper.ActivePersona)) { base.Process(args); } else { CustomProcess(args); }No changes to the web.config are required, PersonaChanger.config in “Include” folder will patch it:
<processor type="Sitecore.Pipelines.RenderLayout.InsertRenderings, Sitecore.Kernel"> <patch:attribute name="type">ChangePersona.CustomInsertRenderings, ChangePersona</patch:attribute> </processor>And you can setup and then test any personalization stuff in a usual way, using persona's:
Happy Holidays!
Hi Alex,
ReplyDeleteFantastic work! I actually wanted to do this but couldn't see a way to force rules to evaluate to true. Looks like you've taken a different route via InsertRenderings, very clever ;)
- Steve Green