Content last modified Monday 15 March 2010
hop to #bottom
Categories:
Author:
chrisrhee
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:
Contact Reason [ ? ]

Articles Sorted By Custom Fields

This may seem simple to others, but I searched around for this for days. If you want to sort a list by one of the Custom Fields, do something like this:

<txp:article_custom section="attorneys" limit="100" form="jumpmenu" sortby="custom_4" sortdir="asc" />

This needs to be in a <txp:article_custom /> tag.

The code above is used to sort all of the articles in the attorneys section of a website by their last name(Custom Field 4) instead of their first.

I.E. James C. Waddoups comes after Kelly J. Latimer.

My thanks to chrisrhee for pointing me in the right direction.

Article Request Count:
Posted here:
13 May 2005
Article modified:
13 May 2005

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (4)

Thanks! I’ve been wondering about this…
Andre (in LA):
Does it work if the custom field contains a date in the form of mm/dd/yyyy? Or maybe yyyy/mm/dd?

Thanks
Aaron Boswell:
I would think you could sort asc or desc and it would use the date you put in. Other than that, I don’t know.
Patchwork:
Very usefull indeed, thanks for your helpfull tip.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
TxP · TxD · GG