[pmwiki-users] Question about Links.

Patrick R. Michaud pmichaud at pobox.com
Wed Apr 19 15:55:40 CDT 2006


On Wed, Apr 19, 2006 at 02:33:03PM -0400, Stirling Westrup wrote:
> This seems like a very simple question, but I'm not having any luck
> figuring it out.
> 
> I want my default homepage in every group to be called 'Home', so I put
> $DefaultName='Home'; in my config.php.
> 
> If I then want to create a link to the default home page of a group, I
> would assume that I merely need to use a link like [[GroupName]], or
> perhaps [[GroupName.]] or [[GroupName/]] to distinguish it from the case
> of a page in the current group that is named 'GroupName' for some reason.
> 
> None of these work. The first case generates a link to
> GroupName.GroupName and the other two don't generate anything at all -
> the links entirely vanish.

Set 

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

if you never want [[XYZ]] to link to XYZ.XYZ.  This will
cause [[XYZ]] to link to {$Group}.XYZ (i.e., 'XYZ' in the current
group) if it exists, otherwise it'll try XYZ.Home or whatever
$DefaultName is set to be.

Pm




More information about the pmwiki-users mailing list