In Business Catalyst, how to sort web app items based on few fields of it on search result page?

StackOverflow https://stackoverflow.com/questions/10901653

  •  12-06-2021
  •  | 
  •  

문제

I have a web app and its search. The search results are on multiple pages means it has pagination. My client's requirement is to have a feature which will sort results based on some web app items. for example we have a field price so when user select the price it needs to sort from high to low. Any one have idea how to do it?

도움이 되었습니까?

해결책

There is a way to do this if you have less than 500 items (if you have more it can still be done but is more complex).

You would output all of your web app items using the module tag. Make sure your list view has the price. Using jquery read all the results and reorder based on the price field.

If this needs to happen on a search results page rather than a regular page, append a variable to the action URL of the search form which you can read on the results page so you know to filter based on price.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top