[pmwiki-users] Trying to figure out what I'm doing wrong with custom sorting

Jan Erik Moström lists at mostrom.pp.se
Thu Jan 25 03:03:15 CST 2007


I would like to have a pagelist with custom sorting so I made 
this markup

(:pagelist group=Personer fmt=title order=$$SortName list=Personer:)

in the config page I've got this

$FmtPV['$SortName'] = '($x=PageTextVar($pn, "sortname")) ? $x : $name';

and on each page in the Personer group I got something like this

(:sortname:Larsson, Lars:)

But my problem is that the listing get sorted in an order which 
I can't figure out. Here is an example from a few pages:

(:sortname:Eckerdal, Anna:)
(:sortname:Boustedt, Jonas:)
(:sortname:Daniels, Mats:)

The pages get listed in the order

Larsson
Eckerdal
Boustedt
Daniels

I'm doing something wrong but I can understand what.


                         jem

PS
And thanks to everybody who is answering questions on this list, 
your help is really appreciated.
DS




More information about the pmwiki-users mailing list