[pmwiki-users] Why don't my pagelists sort correctly?

Crisses crisses at kinhost.org
Sun Oct 15 16:08:54 CDT 2006


My pagelists aren't sorting correctly.  Things should be nicely  
sorted and grouped.  Instead the groups repeat.  :(

Here's the Category/GroupFooter page:

(:if name Category.Author-* :)
(:pagelist link=Category.{$Name} group=Simile fmt=#authorcatlist  
list=normal order=$:Work :)
(:ifend:)
(:if name Category.Year-* :)
(:pagelist link=Category.{$Name} group=Simile fmt=#yearcatlist  
list=normal order=$:Work,$:WAuthor :)
(:ifend:)
(:if name Category.Title-* :)
(:pagelist link=Category.{$Name} group=Simile fmt=#titlecatlist  
list=normal order=$:WAuthor :)
(:ifend:)
(:if name Category.Period-* :)
(:pagelist link=Category.{$Name} group=Simile fmt=#periodcatlist  
list=normal order=$:Year,$:Work,$:WAuthor :)
(:ifend:)
(:if name Category.Publisher-* Category.Type-* :)
(:pagelist link=Category.{$Name} group=Simile fmt=#othercatlist  
list=normal order=$:Work,$:WAuthor :)
(:ifend:)
(:if !name Category.Publisher-* Category.Period-*  Category.Title-*   
Category.Year-*  Category.Author-*  Category.Type-* :)
(:pagelist link=Category.{$Name} group=Simile fmt=#title order=title  
list=normal:)
(:ifend:)

So different types of Category pages get different sorts.

Sorts are NOT working on:
Type-  see http://www.similepedia.com/index.php/Category/Type-Fiction
Period- see http://www.similepedia.com/index.php/Category/ 
Period-20thCentury
Author- see http://similepedia.com/index.php/Category/Author- 
SteinbeckJohn
probably not working on year, but I don't have an example
Publisher- see http://similepedia.com/index.php/Category/Publisher- 
Penguin

Sort doesn't really matter on the Title pages -- two books with the  
same title won't come up very often.

SO -- I'm either doing something wrong, or sorts don't work on  
pagelists when dealing with {{$BaseName}$:Variable}

Clues or hints?




On the brighter side I made a custom category markup to deal with  
periods in the variable values.  *sigh*

// The following markup fixes a problem when retrieving data with  
periods
// to create category page markup.
Markup('[[?','<[[!','/\\[\\[\\?([^\|]*)\|?(.*?)\\]\\]/e', "Keep 
(MakeLink(\$pagename,PSS(helpXES('$CategoryGroup/$1')),PSS('$2'),'',\ 
$GLOBALS['LinkCategoryFmt']),'L')");
function helpXES($param) {
	$param = preg_replace('/[^A-Za-z0-9 -]/', '', $param);
	return  $param;
}

There's probably a better way.  I have yet to implement it on the  
live site.

Crisses
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20061015/735ac4ac/attachment.html 


More information about the pmwiki-users mailing list