Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » sorting lists?

#1 2006-08-27 19:00:33

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

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?

TextBook: linklist

sort="date desc"

Offline

#3 2006-08-27 19:24:01

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

  1. Index
  2. » Archives
  3. » sorting lists?

Board footer

Powered by FluxBB