Fórum

Search portlet Customization

karthik N, modificado 12 Anos atrás.

Search portlet Customization

Regular Member Postagens: 106 Data de Entrada: 01/07/11 Postagens Recentes
Hi all,
Im customizing the Liferay search portlet, I have configured search portlet it displays only document library and web content results.
Now the document library and web content results shown separately. I need that results should be displayed as combined and ordered by ascending.

Any idea?


Thanks in advance.


Karthik
thumbnail
Dave Weitzel, modificado 12 Anos atrás.

RE: Search portlet Customization

Regular Member Postagens: 208 Data de Entrada: 18/11/09 Postagens Recentes
The display of search results is done in the html/portlet/search/search.jsp page
You will see an iteration of the portlet's used in the search
for (int i = 0; i < portlets.size(); i++) {
Portlet portlet = (Portlet)portlets.get(i);


within that iteration there is a searchcontainer declared and built and displayed, this is why the results are grouped by portlet type.

I suspect all you need to do is declare one search container outside of the iteration, then build the list of entries inside that one search container and apply relevant sort criteria. You will need to ensure items such as the totalRows are correctly calculated and set outside of the iteration as well.

Dave