Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-10-18 17:59:43
- pafruu
- Member
- From: New Brunswick, Canada
- Registered: 2010-01-14
- Posts: 65
How do I sort $ values in a custom field
Hello everyone,
I’d like to display articles in an article list where the dollar value of the items that I am selling go from the highest price to the lowest. I found out the plugin ort_article_psort but it is no longer available. Is there something else that I can do?
Here is my code:
<txp:article_custom allowoverride="1" excerpted="1" form="list" limit="999" pgonly="0" section="inventory" sort="custom_14 desc" status="4" />
Please help
P.S.: Custom_14 is the custom Field that contains the $ value of the item that I wish to sort
Last edited by pafruu (2011-10-18 18:00:44)
I try, and I try, and I try…. and sometimes I achieve
Offline
#2 2011-10-18 18:12:13
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: How do I sort $ values in a custom field
In case your problem is sorting values corrctly without adding leading zeros, try sort="(custom_14+0) desc"
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#3 2011-10-18 18:14:28
- pafruu
- Member
- From: New Brunswick, Canada
- Registered: 2010-01-14
- Posts: 65
Re: How do I sort $ values in a custom field
Thanks uli, it worked!!
I try, and I try, and I try…. and sometimes I achieve
Offline
Re: How do I sort $ values in a custom field
uli wrote:
In case your problem is sorting values corrctly without adding leading zeros, try
sort="(custom_14+0) desc"
This needs to be documented ‘somewhere’ as sort is a common attribute all over the TXP place :)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#5 2011-10-19 13:22:51
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: How do I sort $ values in a custom field
merz1 wrote:
This needs to be documented ‘somewhere’
Apostrophes. *g*
I put it on the article pages under sort options.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline