Available Liferay Portal 7.3 GA6 / DXP 7.3+
By default, any user can see all the Collection’s content and is part of the Anyone group. You can create a Personalized Variation of the Collection’s items using Segments. When you use a Personalized Variation, the items that are part of your Collection don’t change, but the Collection Page or Collection Display Fragment show the items filtered for the Segment.
To customize a Collection using Segments, you must define the Segments first. For more information, see Creating and Managing User Segments.
Consider the following example. You want to increase sales in your online Kitchenware Store by offering exclusive promotions to registered users. You create a Collection including promotions for registered users and news about your products. You want all users to see the news about your products, but you want to restrict the promotions to registered users. In this example, you can create a new Segment for registered users, and link the Segment to a new Personalized Variation that filters the promotional content.
You can create multiple Personalized Variations for a Collection, and edit or delete them as needed. You can also edit the Anyone Personalized Variation, but you cannot delete it.
Available for Liferay DXP 7.4+
For situations where a user may belong to multiple segments, Collection variations can be assigned a priority to determine which variation is displayed to a user. When editing a Collection, you can access a sortable list for the Personalized Variations. You can change the rank of a variation by clicking its Actions button () and selecting Prioritize or Deprioritize. You can also drag and drop variations to reorder their priority.
Priority is assigned according to the position of each item in the list. The highest priority is the position at the top of the list.
Creating a Personalized Variation¶
Go to Site Administration → Site Builder → Collections.
From the Collections tab, click the Options menu () next to the Collection you want to customize and select Edit.
Under Personalized Variations, click New Personalized Variation or click the New button ().
In the New Personalized Variation dialog, click the Segment you want to associate to this Collection.
Configure the properties for the Personalized Variation. For more information, see Creating Collections.
For example, if this is Manual Collection, you can select the items you want to display in the Personalized Variation. If this is a Dynamic Collection, you can add a filter to customize the content.
If you are customizing a Dynamic Collection, click Save.
To preview the items that are part of this Collection:
In the Manual Collection, click on the Personalized Variation’s name to see the items.
In the Dynamic Collection, click the Options menu () next to the Personalized Variation’s name and select View Items.
Liferay DXP 7.2¶
Content Set Personalization¶
Now, you’ll use Segments to demonstrate Content Set Personalization. For this example, create a Content Set to be the default displayed on the Home page. Then you’ll modify it to create a personalized variation containing technical articles for members of the American Engineers segment.
If you’re not familiar with Content Set, see the Creating Content Sets article before you get started here.
Creating and Setting the Default Content Set¶
First create the default Content Set and configure it on the Home page using the Asset Publisher.
Go to Site Administration → Content & Data → Content Sets.
Click the Add button () and choose Manual Selection.
Name it Home Page Content.
For the new Content Set, click Select next to Asset Entries and select Basic Web Content.
On the Select Basic Web Content page, check the boxes next to the content you want to add and click Add.
Navigate to the Home page and add an Asset Publisher to the page.
Open Configuration for the Asset Publisher.
Under Asset Selection select Content Set.
Under Select Content Set click Select, choose Home Page Content, and click Save.
Now the Content Set that you configured appears in the Asset Publisher on the Home Page. Next configure the Content Set for Personalization.
Personalizing the Content Set¶
Now create the content set for engineers and configure its display.
Go back to the Content Set from Site Administration.
Click New Personalized Variation and select the American Engineers segment
Click Select next to Asset Entries and select Basic Web Content.
Select articles appropriate to an engineering audience and click Add.
Now anytime a member of the American Engineers segment views this Content Set being displayed, they see the personalized version and not the default. Test this now, using the Simulator.