[pmwiki-users] Pagelist links to groups without default pages (PITS/00736)

Pico pmwiki at ben-amotz.com
Mon May 8 16:25:37 CDT 2006


Here is my pitch for rethinking the way pagelist returns information
about groups, together with some alternatives.

Background:

When a group exists without a default page, links to that target group
are interpreted as links to a page in the current group.

That seems to be a generally understood and acceptable way of dealing
with "ambiguous" links (that is, links that do not identify the full
Group.Page name).

The problem with pagelists: 

When it comes to pagelist directives, however, there is less ambiguity
when creating links to groups, because we *know* that {=$Group} is the
name of a group, not a page.  Since PmWiki does not link to groups, it
links to pages within groups, a decision has to be made in rendering
pagelists about what to do with groups.  Right now, the distributed
PageListTemplates makes the decision that groups should be identified
as links, and leaves PmWiki to resolve any resulting ambiguous links. 
In this particular context, the result is no longer acceptable, because
no user expects that a pagelist that identifies groups will link a
particular group to a page in a different group.

Some alternatives: 

If we accept the proposition that references to groups in pagelists
should be never resolve to pages in different groups, then we need to
decide what, if anything, to do with references to groups.  Here are
some of the possibilities that will work with simple changes to the
PageListTemplate references to each {$=Group}:

1. Do nothing; return groups as links ambiguous or otherwise:
[[{=$Group}]]
2. Identify groups, but don't turn them into links: {$=Group}
3. Link to the recent changes page, because its there:
[[{$=Group}(.RecentChanges)]]
4. Link to *one* default page: [[{=$Group}(.{=$Group})]] or
[[{=$Group}(.HomePage)]] 
5. Link to a search result that identifies all pages in the group:
[[{$Name}?action=search&q={=$Group}/|{=$Group}]]

All of these possibilities, except the first, will provide predictable
and understandable results without regard to ambiguous groups (without
a default page).  Each has pros and cons, but they are all better than
what we are doing right now.  In the end, any of them can be
implemented as the default, for all groups, or just for ambiguous
groups, following some conditional testing.

Pico 





More information about the pmwiki-users mailing list