2

I have come across the situation where we want to implement personalization between the rendering variants for a given rendering.

I know we can do the personalization between the renderings but I'm not sure about the rendering variants.

e.g.

Page Content

--Indian Variant

---Title

--USA Variant

---Title

If the IP address is from USA then given rendering should switch to US variant and if the IP is from India it should switch to the Indian version.

I know that we can do personalization on a section or a field of the rendering variant using rules, but I want to check if we can switch the rendering variant based on personalization.

1
  • I know that we can do personalization on section or field of rendering variant using rules. Commented Jul 2, 2019 at 6:47

2 Answers 2

4

You can do this with rules within the same variant as mentioned. But if you really want to change the variant itself, you would need to be able to change rendering parameters with personalization (the variant is a rendering parameter of the component).

Ootb this is not possible, but James Gregory appears to have done this for you: https://www.americaneagle.com/blog/web-development-blog/james-gregory/2017/09/20/parameter-personalization

His module can be found on the marketplace as well.

1
  • Thanks for your pointer. Yes, it is the closest match so far. Commented Jul 2, 2019 at 23:52
2

The rules you mentioned in your comment should lead you to the solution of your question.

You could create Variant Definition for your component and create multiple Variant Section to the definition, e.g.:

enter image description here

Then apply your personalization rules on the various Variant Sections. This should result in a variant applied based on your personalization rule.

3
  • I already knew that approach, but you cannot achieve using the Personalization screen. Again thanks for your suggestion. Commented Jul 2, 2019 at 23:51
  • Ah yes you are right. I was under the impression the dev team would set up these variants and the rules, but you basically want a content editor to be able to set up personalization for a component and select whatever variant should be shown then? Commented Jul 3, 2019 at 6:49
  • Absolutely..... Commented Jul 3, 2019 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.