[pmwiki-users] [pmwiki-devel] LinkUrl / LinkTxt question

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 6 15:07:14 CST 2007


On Tue, Feb 06, 2007 at 01:06:27PM -0600, Patrick R. Michaud wrote:
> On Tue, Feb 06, 2007 at 12:12:08PM -0500, The Editor wrote:
> > Actually what I want is for [[Group.]] to link to Group.Home or
> > whatever I set it to. 
> 
> I'm working on this.

Okay, I've gone around and around in my head on this, and I've
finally decided that the current $DefaultName implementation 
isn't the right approach to the overall problem of setting a
default page for a group.  This isn't terribly surprising,
considering that $DefaultName has been around since PmWiki 0.1 -- 
even before we had WikiGroups! :-)

Unfortunately, fixing $DefaultName looks like it will break a
fair number of recipes and/or make things really confusing...
not to mention that I don't have the complete solution mapped
out anyway.

So, in the meantime, I think I'll just introduce a special
$EnableGroupHomeIsDefault configuration variable.  When set
it will cause [[Group.]] and [[Group/]] links to point to
Group.{$DefaultPage} instead of Group.Group.

Yes, this is a special case, and I can come up with lots of
more general ways to support this often-requested behavior.
I can even come up with nice mechanisms that allow each 
group to have a different default home page.  But implementing
the general ways at this stage looks as though we'll end up

  1. breaking existing recipes and customizations,
  2. coming up with an implementation that is almost certain
     to break things in the future, and/or
  3. add lots confusion by having multiple different variables
     with essentially the same purpose/meanings.

Since I don't want any of those outcomes, I think we'll just
resolve the immediate issue via the special configuration
variable.  When we have a more general-purpose solution it'll
be easy to map this special case into the general one.

Look for this change in 2.2.0-beta29.

Pm



More information about the pmwiki-users mailing list