Personalizing Collections
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 personalized variation. However, 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, collection display fragment, or asset display widget show the items filtered for the segment.
To customize a collection using segments and set personalized variations for collections, you must define 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.
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.
Creating Personalized Variations
After you create segments for your users, you can add personalized variations for collections based on those segments.
-
Open the Global Menu () and navigate to Site Builder → Collections.
-
Create a collection or select an existing one.
-
Click Add Personalized Variation.
If you already have a personalized variation in place and you have other available segments, add new personalized variations by clicking Add () next to Personalized Variations.
-
Choose a Segment and customize the collection accordingly.
You can now control what users can see by prioritizing personalized variations or combining collection entries from all segments.
Prioritizing Variations
for Liferay DXP 7.4+
For situations where a user may belong to multiple segments, you can combine collections entries from all the segments to which the users belong or prioritize a personalized variation to determine which personalized variation appears to a user.
When editing a collection, access a sortable list for the personalized variations and 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.
Combining Collection Entries From All Segments
With users that belong to multiple segments, you can combine and show collection entries from all the segments to which they belong instead of showing only the default entries or the prioritized personalized variation.
-
Open the Global Menu () and select the Control Panel tab → System Settings under Configuration.
-
Under Content and Data, select Assets.
-
Under System Scope, select Collections.
-
Enable the feature for Dynamic and Manual Collections.
-
Click Save.
Users that belong to multiple segments can now see content from all segments.
For example, there are three segments: Registered Users, Brazilian Users, and Canadian users. If you are a registered user, you see only the content selected for that segment. The same works for Brazilian and Canadian users. However, if you are a Registered User who lives in Brazil, you can see the content selected for both segments. If you don’t belong to any segment, you see the content set to Anyone.