Skip to content

marceltanuri/content-segmentation-with-info-list-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Content segmentation with InfoListProvider

Complex content segmentation needs in Liferay DXP 7.2 can be solved by using InfoListProvider.

Basically, you just have to create an implementation of InfoListProvider, declare the type of the contents in your list, and return the desired list of contents using your own strategy of query.

Here is a real world scenario of content segmentation:

  • General objective: Find the banner to be displayed in the principal portal page

  • Rules:

      1. Find the most recent JournalArticle. At least one of its tags must to match with at least one of the tags of the logged user.
      1. If there is no JournalArticle in the filter above, so find the most recent JournalArticle set by public for everyone.
      1. Important: In the two filters above, it is only be accepted JournalArticles that have been published in the last 48 hours.
      1. If any of the conditions above were satisfied, so any JournalArticle will be displayed.

Here is the code used to cover those rules.

I’ve been used elasticSearch queries instead of conventional SQL in order to gain better performance.

Source: https://github.com/marceltanuri/content-segmentation-with-info-list-provider

References:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages