[pmwiki-users] Can I set default home page name to HomePage instead of {$Group}?

Eemeli Aro eemeli at gmail.com
Sat Sep 12 11:36:23 CDT 2009


2009/9/12 Tegan Dowling <tmdowling at gmail.com>:
> If I create a link to the home page of a group that doesn't yet exist:
> [[NewGroup/]] and click it, the wiki takes me to
> NewGroup.NewGroup?action=edit.  I want it to take me to
> NewGroup.HomePage?action=edit.

Set this in config.php:

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

> I can live with the Site.Site and SiteAdmin.SiteAdmin pages
> functioning as the home pages for those default groups, but I want new
> groups to have default home pages named HomePage, not named the same
> as the group -- I find users confused by having the home page of a
> group having the same name as the group itself.

Alternatively, you could change the default URL of group home pages,
which doesn't have to exactly match what the wiki uses internally. I
use something like the following:

if (strpbrk($pagename,'./') === FALSE) $EnableFixedUrlRedirect = 0;
$FmtPV['$PageUrl'] = 'PUE(($pn=="Main.HomePage")
	? "$ScriptUrl/"
	: (($name==$group)
		? "$ScriptUrl/$group"
		: "$ScriptUrl/$group/$name" ))';

> I've looked in the documentation, of course, but if the answer is
> there, I'm not finding it.

This is at least mentioned in the documentation at
<http://www.pmwiki.org/wiki/PmWiki/LinkVariables#PagePathFmt>.

eemeli



More information about the pmwiki-users mailing list