1

Displaying content’s based on category and tags criteria works well but how should we get results by filtering and refining results based on checkbox(es) selected? This is what I want to achieve – the checkbox(es) criteria are same as defined in custom structure for web content. The results can be displayed on the same page. enter image description here

Sheetal Mohan Sharma
  • 2,908
  • 1
  • 23
  • 24

2 Answers2

2

Here is my solution approach and please guide me here.

I intend to solve this by having check boxes instead of links in categories navigation portlet by using a jsp hook and then pass the checked category id’s as request parameters to the action class (and modify the query which is used for retrieving the contents based on category id’s.

So far I am able to create checkboxes as shown in this image. The main problem is identification of the action class which is being called on click of category link in category navigation portlet. Hence I am not able to retrieve the checked categories ids from request. enter image description here

The current URL displayed on category link hit is as fallows:

http://serverName:8080/web/mediasolutions/demos?p_p_id=122_INSTANCE_K5Gj&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=2&p_r_p_564233524_categoryId=13569

As it clear from above URL it passes a single category id on link click <p_r_p_564233524_categoryId=13569>. I want to achieve filter and refine approach on click of each check-box and for that I guess I need to be able to

  1. Save the current state of results.
  2. Should be able refine the current result set on next check-box selection.

Can any body suggest me the action classes and other relevant information ( code snippets, design docs etc)required for above solution approach?

Sheetal Mohan Sharma
  • 2,908
  • 1
  • 23
  • 24
  • 1
    Sheetal, that is a really cool solution. I hadn't though about using categories and the asset publisher in that way. – rp. Jul 05 '11 at 21:00
  • The above solution is working now. We created a hook and made changes to JSP and java classes to handle multiple categories ( selected checkboxes). This is something we LifeRay can provide in next release :). – Sheetal Mohan Sharma Jul 14 '11 at 11:20
0

Looks like "faceted" search will have preliminary support in Liferay Portal 6.1, see LPS-6473, which is scheduled for general release some time later this year.

rp.
  • 3,435
  • 1
  • 21
  • 29
  • The only solution outside of the Liferay APIs are to implement the entire solution by yourself or find an existing solution and deploy to Liferay. – rp. Jun 15 '11 at 17:39
  • Thanks for your response but the faceted search is not enough and the source code is not available for custom changes. As of now I am using categories navigation and asset publisher portlet combo but that takes only category at a time whereas I want to filter on multiple categories. http://stackoverflow.com/questions/6347829/adding-custom-filter-for-asset-publisher-portlet I am also fine with what I see here at - http://portal.eqentia.com/socialmedia/connection/1520-Blogs?connection_refine=1587&filter=all Thanks, Sheetal Mohan Sharma – Sheetal Mohan Sharma Jul 05 '11 at 07:04