0

I'm looking to create my own Web Content List portlet. I exactly want to display the web content of my portal applying some filters.

I'm a little bit lost...

  1. I tried to create a hook but I dont know how to find the possible actions of this portlet.

  2. I don't want to get all the content. I want to use a rules mechanism for filtering the contents(drools portlet), depending on the user information.

Thank you in advance, Oriol

user1592470
  • 401
  • 2
  • 8
  • 21

1 Answers1

2

You can get the list of web contents by using following method:

List<JournalArticle> result = JournalArticleLocalServiceUtil.getArticles(groupId, -1, -1); 

You can display the list using liferay search container as:

<liferay-ui:search-container delta="30" emptyResultsMessage="no-users-were-found">`
<liferay-ui:search-container-results>`
results="<%= result%>"
total="<%=result.size() %>" />

<liferay-ui:search-container-row
className="com.liferay.portlet.journal.model.JournalArticle"
keyProperty="articleId"
modelVar="content" >

<liferay-ui:search-container-column-text
name="ID" value="<%= content.getArticleId()%>" /> // You can add multiple columns

</liferay-ui:search-container-row>
<liferay-ui:search-iterator /> 
</liferay-ui:search-container>

Hope this will help you.

Learner
  • 976
  • 14
  • 29