Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.

 

Magnus Rahl
Dec 17, 2010
  5514
(1 votes)

Working with personalized Content groups in CMS 6 R2

Introduction

Content groups is a concept used when working with content for Visitor Groups in EPiServer CMS 6 R2. If you are not yet familiar to Visitor Groups, check out Allan Thræn’s blog post announcing the CMS 6 R2 beta.

Content groups enable you to make sure only one piece of content is displayed to a visitor even if the visitor matches several Visitor groups. It also allows you to display content to visitors who don’t match any of your selected Visitor groups. This is best illustrated with an example.

The task

I want to display a friendly (more or less) greeting on the start page which varies with the time of day. For this I have created three visitor groups: Morning visitors (visit between 6AM-noon), Afternoon visitors (noon – 6PM) and Evening visitors (6PM-midnight). So let’s give them some personalized content!

Setting it up

First, I add a greeting intended for the Morning visitors, select that piece of content and click the Personalized content button:

contentgroup_1

That displays the following dialog where I select my target Visitor group.

contentgroup_2

If I were to save and publish the page now, morning visitors would get a greeting and anyone visiting at a different time would see no greeting at all. Not very polite!

So, I go on to add a Content group which the greeting is part of. I call it “Greeting”:

contentgroup_3

I click OK to add the personalization to the editor, and proceed to add a greeting for the Afternoon visitors. I mark that content and again click the Personalized Content button. I select to display the content for Afternoon visitors, and then select the (now already existing) content group Greeting:

contentgroup_4

I continue to add another one for Evening visitors, and then I add a final greeting where I don’t select anything in the Visible To box of the Personalized Content dialog. I still add it to the Content group Greeting though. In the editor the final result looks as follows:

contentgroup_5

Note the blue Greeting icon with the connected cord. This means all of these pieces of content are in the Greeting Content group and only one of them will be displayed, just as we intended. Note also the text in the gray box of the last piece of content, which very nicely explains that it will be displayed to anyone not matching any of the other visitor groups. It will of course match visitors between midnight and 6 AM since the other Visitor groups cover all other hours of the day.

I can use the Preview in edit mode to view the page as a certain visitor group, for example a Morning visitor:

contentgroup_6

And I can select to view it as no Visitor group at all:

contentgroup_7

So now you know how to work with Content groups! Happy editing!

Dec 17, 2010

Comments

tost
tost Dec 20, 2010 04:10 AM

Very well explained! Cheers!

Please login to comment.
Latest blogs
Level Up with Optimizely's Newly Relaunched Certifications!

We're thrilled to announce the relaunch of our Optimizely Certifications—designed to help partners, customers, and developers redefine what it mean...

Satata Satez | Jan 14, 2025

Introducing AI Assistance for DBLocalizationProvider

The LocalizationProvider for Optimizely has long been a powerful tool for enhancing the localization capabilities of Optimizely CMS. Designed to ma...

Luc Gosso (MVP) | Jan 14, 2025 | Syndicated blog

Order tabs with drag and drop - Blazor

I have started to play around a little with Blazor and the best way to learn is to reimplement some old stuff for CMS12. So I took a look at my old...

Per Nergård | Jan 14, 2025

Product Recommendations - Common Pitfalls

With the added freedom and flexibility that the release of the self-service widgets feature for Product Recommendations provides you as...

Dylan Walker | Jan 14, 2025

My blog is now running using Optimizely CMS!

It's official! You are currently reading this post on my shiny new Optimizely CMS website.  In the past weeks, I have been quite busy crunching eve...

David Drouin-Prince | Jan 12, 2025 | Syndicated blog

Developer meetup - Manchester, 23rd January

Yes, it's that time of year again where tradition dictates that people reflect on the year gone by and brace themselves for the year ahead, and wha...

Paul Gruffydd | Jan 9, 2025