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

The Editor editor at fast.st
Thu Jan 25 04:36:00 CST 2007


On 1/25/07, Jan Erik Moström <lists at mostrom.pp.se> wrote:
> 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


I was able to get sorting by text variables to work by doing something
like this, with no changes to the config file:

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

I don't know about the list=Personer part, what that would do.  Hope this helps!

Cheers,
Dan




More information about the pmwiki-users mailing list