Filtering Search Results

5 posts by 2 authors in: Forums > CMS Builder
Last Post: March 22, 2011   (RSS)

By Rohwer - March 22, 2011

Looked through the forum for a couple days for a similar question but nothing seemed like mine so posting.

I have a search page that works great. On the results page I would like to have a drop down that has options like "Price : High to Low", "Engine Size : Low to High" etc etc...

How can i sort the results on the Results page even further without losing their initial search criteria.

Re: [Jason] Filtering Search Results

By Rohwer - March 22, 2011

So i add all the hidden fields based on the previous query and the action should link to the same page.

Next question is what option value do I use to utilize the CMS viewer to : ORDER BY 'X variable' Asc/Desc ?

Re: [Rohwer] Filtering Search Results

By Jason - March 22, 2011

Hi,

What you would do is give your form element the name orderBy and then the value being how you want it sorted. For example:


<select name = "orderBy">
<option value = "price ASC">Price: Low to High</option>
<option value = "price DESC">Price: High to Low</option>

</select>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Filtering Search Results

By Rohwer - March 22, 2011

Works perfectly. Thanks again Jason.