Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
sorting lists?
Hi there,
Im a little stuck with this and cant find an answer in the textbook.
I have a list generated with this:
<code><txp:linklist form=“Links” category=“quickbits” limit=“5” /></ul></code>
At the moment it seems to be sorting according to the alpahbetical order of the first word of the title. Anything starting with A appears at the top in other words. It seems a little strange
I cant work out how to sort it. I just want newest post in the list to show at the top.
Any ideas
Offline
#2 2006-08-27 19:23:06
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: sorting lists?
sort="date desc"
Offline
Re: sorting lists?
Sorting is alphabetic by default (based on the linksort field). For sorting on anything else, you have to specify it.
Try: <code><txp:linklist form=“Links” category=“quickbits” limit=“5” sort=“date desc” /></code> (or “date asc” for reverse order. I can never keep those two apart)
<i>edit: just a minute too late, I see :)</i>
Last edited by ruud (2006-08-27 19:24:38)
Offline
#4 2006-08-27 19:46:39
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: sorting lists?
…for reverse order. I can never keep those two apart…
asc(ending) means first to last (going up a staircase), desc(ending) means last to first (going down the staircase). By alphabet, that’d be a to z and z to a. By date, that’d mean oldest to newest and newest to oldest.
Offline
Pages: 1