[pmwiki-users] pagelist is creating links relative to the current group?

Américo Albuquerque aalbuquerque at lanowar.sytes.net
Wed May 24 11:11:37 CDT 2006


----- Original Message -----
Subject: Re: [pmwiki-users] pagelist is creating links relative to the 
current group?
Date: Wed, 24 May 2006 10:26:48 -0500
From: "Patrick R. Michaud"

(...)
 > The crux of the problem is that there are multiple possibilities for
 > a group's "default home page"-- i.e., for a group XYZ the default
 > home page can be either "XYZ.XYZ" or "XYZ.HomePage". (Actually, a
 > site administrator can have any number of default home pages
 > for a group -- these two are just the PmWiki default.)
I thought that was what $DefaultPage was for, to define what the default 
home page was.

 >
 > So, when generating a link to the "group home" and no group home
 > page exists, we don't have any real way of knowing what name to
 > choose, and so far I've been reluctant to impose a choice upon
You simply choose the value of {$DefaultName}. If a site wants a 
different name then just defines this variable with a different value in 
a local config.

 > sites. Some sites seem to prefer the XYZ.XYZ form of group home,
 > while others prefer XYZ.HomePage. (There are situations where each
 > is more appropriate than the other, which is why PmWiki allows a
 > choice.)
Since you can also have {$group}.php config files you can define 
{$DefaultName} differentely for each group

 >
 > However, the present situation of having a group home inadvertently
 > link into the current group is worse than nothing, so we need
 > to fix it.
The problem is how to know if [[sometext]] is a group name without a 
page name or a page name without a group name. What if the site had a 
group called XYZ and a page called Main.XYZ? Wich one would [[XYZ]] link 
to when used in the Main group? The XYZ group or the Main.XYZ page? We 
could add a new markup like [[g:XYZ]] to state that we want the XYZ 
group, not the Main.XYZ page

 >
 > Does anyone have an idea about how PmWiki can select an appropriate
 > name for the group home when no default page exists for the group?
 > Should we just say that PmWiki always defaults to "XYZ.XYZ" in
 > this case, or ... ?
It should choose XYZ.{$DefaultName}, that what's that variable is for, 
right?

 >
 > ----
 >
 > An alternate approach: Another approach would be to add a {$GroupUrl}
 > page variable that references the group home url, analogous to
 > the existing {$PageUrl}. The advantage of this approach is that
 > it works regardless of the name used for group home pages. The
 > disadvantages are that it will render as an external link instead
 > of a page link (i.e., like an InterMap or http: link), and will
 > have the same look even if the target default page doesn't exist.
 > For the PmWiki skin this isn't a big difference, but for other
 > skins it could be somewhat confusing.
I don't see any difference in using either (except in the actual link 
that is :D). Using {$PageUrl} is also rendered as an external link. If 
the default group homepage doesn't exist it will show the "404 not 
found, create new page" page.

Regards,
Americo Albuquerque







More information about the pmwiki-users mailing list