Hi guys,
I am trying to create a display that sorts nodes by price.
For example, I have a node that has a field called "price" and has value of 100. I want to create a block that presents 3 nodes that are their "price" field is the closest to 100.
Is there any way to do it without using custom module?
BTW this is not commerce site, the "price" field is just simple decimal field.
Thank you !
Comments
Comment #2
saurabh.dhariwal commentedYou can do it by using "SORT CRITERIA" in views. Add price field using add option & sort as ASC or DESC order.
For showing only 3 nodes in views go to "PAGER" settings and set "3" from "item to display" field.
Let me know incase of any query/concern regarding the same.
Thanks!
Comment #3
renatog commentedHi @dvir-cohen,
#2 it's ok.
You can use Sort criteria as cited by @saurabh.dhariwal
Comment #4
renatog commentedThanks, Saurabh