[pmwiki-users] off-topic: Behaviour of non-existiant home page (was: Nested groups)

Patrick R. Michaud pmichaud at pobox.com
Fri Jun 3 11:28:07 CDT 2005


On Fri, Jun 03, 2005 at 07:19:44AM -0800, Chris Lott wrote:
> On 6/3/05, Hans <design at flutesong.net> wrote:
> 
> > re 3) I often use Group/Group as the index page for a new group,
> > instead of having a Group/HomePage. I can link to it from pages simply
> > typing [[Group]]. Same works now by entering in the address bar
> > mysite.com/pathtowiki/Group which is very convenient.
> > Group.Group is for me an alternative form of Group.HomePage
> 
> I would really like to get rid of this differentiation in my wiki
> setups. Is there some way to enforce the creation of just one of
> Group/Group or Group/HomePage and at the same time make Group/ always
> work?

If you want it to always be Group/HomePage (or, really, Group/$DefaultName),
then set

    $PagePathFmt = array('$Group.$1', '$1.$DefaultName');

and this gets rid of the Group/Group default home page.  Links to Group/
will still correctly forward to Group/HomePage (or whatever $DefaultName
is set to be).

Note that PagePathFmt can be fairly complex, thus:

    $PagePathFmt = 
      array('$Group.$1', '$1.$1', '$1.$DefaultName', '$1.Home', 'Global.$1');

says that given a page reference of [[XYZ]], link (or redirect) to 
the first of:
    XYZ in the current group
    XYZ.XYZ
    XYZ.HomePage  (or whatever $DefaultName is set to be)
    XYZ.Home
    Global.XYZ

In other words, it's possible to use $PagePathFmt to make some
page references work in every group.  Or one can be as simple as

    $PagePathFmt = array('$Group.$1');

which always looks only for pages in the current group.

Pm



More information about the pmwiki-users mailing list