Ok, before anyone points me to RTFM, let me just say, that I've actually implemented this on a few sites, using getpage rather than just getresources and they have all worked according to my needs, and what those needs were was to give visitors the ability to sort a list according to a template variable.
Now in all instances I used a listbox (single select)template variable as so (in this case for rating):
1==[[$one_star]] || 1.5==[[$one_and_half]] || 2==[[$two_star]] || 2.5==[[$two_and_half]] || 3==[[$three_star]] || 3.5==[[$three_and_half]] || 4==[[$four_star]] || 4.5==[[$four_and_half]] || 5==[[$five_star]]
Now, on my current project which is days from launch, I created a template variable called "price", in which the numerical value is entered into a text field, nothing more and, for some reason, getpage doesn't return the proper output. For example on a "low to high" page the first in the list is not the lowest priced item.
here's an example of the call. (I use getpage for pagination)
[[!getPage? &elementClass=`modSnippet` &showHidden=`1` &sortbyTV=`price` &sortdirTV=`ASC` &element=`getResources` &parents=`7,8,9,10,11,12` &limit=`8` &pageLimit=`2` &pageVarKey=`page` &includeTVs=`1` &includeContent=`1` &tpl=`store_post` &tvPrefix=`tv.` &cache=`0`]]
<div class="paging">
<ul class="pageList">
[[!+page.nav]]
</ul>
</div>
and here's the template:
<div class="product_info_container">
<div class="product_name">[[+tv.product_name]]</div>
<div class="product_details">[[+tv.product_details]]</div>
<div class="product_price">price: [[+tv.price]] USD</div>
<div class="product_purchase">[[+tv.pay_button]]</div>
<div class="view_cart">[[$viewcart]]</div>
</div>
I'm on Revolution 2.2.13-pl (I tried updating to 2.2.14 but there was a php error which scared the begeezus outta me and until I isolate the cause, with launch looming, I'm not touching it!

) All packages are current as well.
Any help or suggestions would be greatly appreciated
p.s. I know the above getpage call is for ASC not DESC...I was just using the low to high as an example
[ed. note: tux384 last edited this post 12 years, 6 months ago.]