[pmwiki-users] Pagelist problems (pretty advanced)

Crisses crisses at kinhost.org
Sat Oct 14 10:15:14 CDT 2006


I've defined the following pagelist:

!!!fmt=#periodcatlist

For the Period category pages.

[@
[[#periodcatlist]]
(:if expr ( ! equal "{Data-{=$BaseName}$:Year}" "{Data-{<$BaseName} 
$:Year}" ) ||  ( ! equal "{Data-{=$BaseName}$:Work}" "{Data-{< 
$BaseName}$:Work}" ) ||  ( ! equal "{Data-{=$BaseName}$:WAuthor}"  
"{Data-{<$BaseName}$:WAuthor}" ) :)
*   [[ Category/Year-{Data-{=$BaseName}$:Year} | {Data-{=$BaseName} 
$:Year} ]] - [[ Category/Title-{Data-{=$BaseName}$:Work} | {Data-{= 
$BaseName}$:Work} ]] - [[ Category/Author-{Data-{=$BaseName} 
$:WAuthor} | {Data-{=$BaseName}$:WAuthor} ]]
(:ifend:)
[[#periodcatlistend]]
@]

in other words:
  If the year changes, OR the title of the "work" (book) changes, OR  
the Author's name changes:
spit out another header of category links to specific pages


The problem is probably in the "order".  This pagelist format is  
called from Category/GroupFooter with:

(:if name Category.Period-* :)
(:pagelist link=Category.{$Name} group=Simile fmt=#periodcatlist  
list=normal order=$:Year,$:Work,$:WAuthor :)
(:ifend:)

Something's wrong with the sort order:

http://similepedia.com/index.php/Category/Period-20thCentury
yields:
1939 - The Grapes of Wrath - Steinbeck, John
1937 - Of Mice and Men - Steinbeck, John
1939 - The Grapes of Wrath - Steinbeck, John
1930 - As I Lay Dying - Faulkner, William
1939 - The Grapes of Wrath - Steinbeck, John
1930 - As I Lay Dying - Faulkner, William
1939 - The Grapes of Wrath - Steinbeck, John
1930 - As I Lay Dying - Faulkner, William

When I would be expecting:

1930 - As I Lay Dying - Faulkner, William
1937 - Of Mice and Men - Steinbeck, John
1939 - The Grapes of Wrath - Steinbeck, John

Anyone know what I did wrong this time?  Does the pagelist sort  
handle alphaNUMERIC sort?  Years, I expect, will always be 4 digits,  
so I don't need a sophisticated numeric sort...

Crisses




More information about the pmwiki-users mailing list