[pmwiki-users] pagelist of groups home pages w. title

Patrick R. Michaud pmichaud at pobox.com
Fri Feb 24 08:04:26 CST 2006


On Fri, Feb 24, 2006 at 01:51:53PM +0000, Hans wrote:
> Friday, February 24, 2006, 1:19:39 PM, OBUTEX wrote:
> > (:pagelist fmt=bygroup name={$Group} order=title:)
> > shows only current Group.Group page name
> > but I need to get all Group.Group or Group.HomePage titles
> 
> This works, but I could not get it working when I added order=title.
> Then I got loads of duplicate results. Even when I used
> 
> (:pagelist fmt=group order=title:)
> 
> Is this a bug?

No, it's not really a bug.  The "fmt=group" template works by
displaying a line whenever the group of the current page in the list
is different from the group of the previous page in the list.
This assumes that the pages are ordered such that all pages in
the same group are listed together.  Using order=title breaks
that assumption, in that pages from different groups are all
mixed together.  Thus, every time there's a pair of pages in
the list that are in different groups, another group line is
generated.

The solution is to make sure we only have the group home pages
to begin with prior to doing the ordering, thus the 
"list=groups" option I suggested in my previous message.  :-)

I'm wondering if "list=groups" is useful enough to add to the core.

Pm




More information about the pmwiki-users mailing list