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

4

1 回答 1

2

您可以使用以下方法获取网页内容列表:

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

您可以使用 liferay 搜索容器将列表显示为:

<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>

希望这会帮助你。

于 2013-07-02T06:17:44.930 回答