Sheetal Mohan Sharma
Sheetal Mohan Sharma

Reputation: 2924

Liferay - filtering and refining contents based on checkboxes?

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

Upvotes: 1

Views: 2798

Answers (2)

Sheetal Mohan Sharma
Sheetal Mohan Sharma

Reputation: 2924

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?

Upvotes: 2

rp.
rp.

Reputation: 3465

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.

Upvotes: 0

Related Questions