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

Kathryn Andersen kat_lists at katspace.homelinux.org
Mon Oct 16 04:46:13 CDT 2006


On Sun, Oct 15, 2006 at 05:08:54PM -0400, Crisses wrote:
> 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.

Would you consider -- I know it would be a lot of work, but it could be
worth it -- rethinking the way you organize your categories?
The thing is, in PmWiki there are only two things that are special about
the Category group
1) [[!MyCategory]] markup is really just a shortcut for
[[Category/MyCategory]]
2) Category pages that don't exist don't get a '?' against them.

In all other respects, the Category group is just like any other group.
That means that any other group... could be treated as a special
category group.

I ran into the problem of trying to index on multiple types of category
myself (for book reviews and my private story archive), and, yes, my
solution was made before the 2.2betas came out, but I think it's still
worth considering.  Basically you make a different group for each kind
of category you want -- one for Authors, one for Genres (or as you have
it, "Type") and so on.  Then, rather than going

        [[!Type-Fiction]]

You would go

        [[Type/Fiction]]

(or [[Type.Fiction]])

when making your "categories" for a given page.  You would then still
use the same kind of pagelists in the GroupFooter for your different
category groups, since the link= option in pagelists works for normal
links as well as [[!Category]] links.  (Powerful stuff, the pagelist)

http://www.pmwiki.org/wiki/Cookbook/StoryArchive#Indexes
discusses this -- note that that is oriented towards a
story-collection, and each page is about one story.  In your case you
presumably would want it to be more fine-grained, since you're
collecting similes, but I think the same principle applies.

For some examples of this idea in action, you can look at my Book
Reviews page:
http://www.katspace.org/reviews/Books/
And various category groups:
http://www.katspace.org/stuff/Authors/Authors
http://www.katspace.org/stuff/Genres/Genres
http://www.katspace.org/stuff/Series/Series

Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe




More information about the pmwiki-users mailing list