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

H. Fox haganfox at users.sourceforge.net
Wed May 24 14:11:13 CDT 2006

On 5/24/06, Pico <pmwiki at ben-amotz.com> wrote:
> Patrick R. Michaud <pmichaud <at> pobox.com> writes:
> > After reading some of the initial suggestions and thinking about
> > it a bit, I've decided to introduce a {$GroupHome} page variable,
> > which returns the current "home page" for a group.  It currently
> > uses the default page as given by $PagePathFmt if such a page
> > exists, otherwise it defaults to a page named the same as the group.
> >
> > (The default can be changed with a customization to the {$GroupHome}
> > page variable, if that's not sufficient I'll add more options.
> > PmWikiPhilosophy #3 applies here.)
> >
> > One can see this new setting in effect at
> > http://www.pmwiki.org/wiki/PITS/00736 , or look
> > at the pagelist in http://www.pmwiki.org/wiki/Test/GroupHome
> > and check the destinations of the various group links.
> >
> > This update will appear in the 2.1.7 release, sometime later today.
> >
> > Thanks for the suggestions and feedback,
> >
> > Pm
> This seems to work great for pagelists, but I notice that when you test the
> variable on a group that doesn't have a home page (or doesn't use the default
> page as given by $PagePathFmt) that the {$GroupHome} variable does not return
> anything, i.e.
> {Cookbook.$GroupHome}    => Cookbook.Cookbook
> {Main.$GroupHome}        => nothing (where Main.HomePage exists)
> {NoSuchGroup.$GroupHome} => nothing (where no home pages exist)
> Can you explain what makes this work on PageLists?  (and provide any other info
> that we can use to document this).
> Pico

I'm pleased to see the pagelist links to non-existent group home pages
fixed.  I think it will be especially helpful for inexperienced
authors because linking to CurrentGroup.OtherGroupName was confusing.

FWIW, as an author I would have expected these to display the names of
the home pages for the respective groups:

   Main.{$GroupHome} => Main.HomePage
   PmWiki.{$GroupHome} => PmWiki.PmWiki
   GroupWithNoHomePage.{$GroupHome} =>

If someone creates GroupWithNoHomePage.HomePage, then the third link
would automagically switch over to that.

Put another way, it would be nice to be able to link to another
group's home page without knowing what that home page's name is, or
even if it exists.


More information about the pmwiki-users mailing list