Collection Providers

Collection providers group items into collections for display on your pages. Several are available out of the box, or you can create them using the Information Framework to group items into the collections you need.

Note

The term items can refer to more than content, such as products and categories, and they can be located outside the current site or Liferay instance.

Default Collection Providers

The following collection providers are available out of the box:

Collection ProviderDescriptionCorresponding Widget
Liferay DXP 2024.Q4+ System ObjectsDisplays entries from registered system objects (e.g., Accounts, Commerce Orders, Organizations, Users).N/A
Most Viewed AssetsDisplays the most viewed assets on the current site from most to least. Deprecated in 2024.Q4. Instead, use the Asset Publisher widget with the Most Viewed Assets collection provider.Most Viewed Assets
Highest Rated AssetsDisplays rated assets from highest to lowest.Highest Rated Assets
Recent ContentDisplays recently modified assets from the most recent to least recent.Recent Content

When configuring a collection display fragment, you can choose collection providers such as Most Viewed Assets, Highest Rated Assets, and Recent Content.

Some collection providers are created automatically by Liferay’s applications. For example,

Related items collection providers show lists of items related to the main items being displayed. You can access these collection providers in two ways:

  1. By adding a collection display fragment to a display page.

  2. By nesting collections within a collection display fragment on a content page.

When configuring a collection display fragment, you can choose Related Items collection providers.

Related Assets: shows items related to the main item on display.

Categories for This Item: shows the categories of the current item or asset.

Items with Categories in the Same Vocabularies: shows items in the same vocabulary as the main asset being viewed. For example, if the main asset has the category football, and football is part of the sports vocabulary, all other categories under the sports vocabulary are shown.

Items with the Same Categories: shows items with the same category as the main item being viewed. For example, if the main item has the category football, items with the same category appear. You can further refine the results by selecting Any Category of the Same Vocabulary or A Specific Category under Advanced Rule.

Items with the Same Categories requires you to choose an item type.

Objects in a Relationship: (when viewing an object) shows other objects that have a relationship to the object being viewed. A new related item collection provider appears for every relationship the main object has. For example, if the main object is a country and has a one-to-many relationship with a city object (with many cities mapped to one country), all city object entries related to that country entry are shown.

Advanced Rules for Items with the Same Categories

You can further refine displayed items while filtering them based on their types.

When configuring the Items with the Same Categories provider, you can choose advanced rules from the drop-down.

Any Category of the Same Vocabulary: shows all items with categories in the same vocabulary as the main asset. For example, if the main asset has the category football all other items in the sports vocabulary are shown.

A Specific Category: shows results from an additional category to further refine the list. For example, you can add an additional category, breaking news, to display assets with the category football and breaking news, which shows assets matching breaking news for football.

Tip

By default, selecting a parent category automatically selects its child categories. This can be changed in the Control Panel under Instance Settings.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy