Short answer: You can try setting this to config.php:
$PagePathFmt = array('{$Group}.$1','$1.{$DefaultName}','$1.$1');
This will affect the "Name" link in the page header, as well as wiki
links like [[Name/]], [[Name.]], [[Name]] from within the Name group,
and [[Name]] from another group.
Long answer:
There is ambiguity when you have pages Name.Name, Name.HomePage, and/or
Main.Name. When a link [[Name]] is encountered indeed PmWiki may use a
process different from the one in the author's mind. Same for the "Name"
link in the page header. Same for (:pagelist list=grouphomes:) and the
recently added page variables {$GroupHomePage} and similar.
To calculate the full page name in the case only "Name" (no group) is
supplied, the array $PagePathFmt is used, and the first page that exists
from that array is returned.
This is the default:
$PagePathFmt = array('{$Group}.$1','$1.$1','$1.{$DefaultName}');
When the string "Name" is derived from the URL, such as when the browser
follows a group link from a page header, then {$Group} is
{$DefaultGroup} (Main) and the URL works like when it was a link
[[Name]] in the Main group.
When you have a link [[Name]] in any group, it will process it according
to $PagePathFmt. So it will first try CurrentGroup.Name, then Name.Name,
then Name.HomePage, and whatever page first exists it will be returned.
For links [[Name/]] or [[Name.]], it knows that "Name" is the group
name, but then again if both Name.Name and Name.HomePage exist, it will
use the order of $PagePathFmt.
Note that a link [[Name]] in a page of the Name group would point to
Name.Name if it exists (from '{$Group}.$1'), and the same link in
another group may point to Name.HomePage.
Also a link [[Name]] in a group different from Name/, and a link
[[Name]] "included" in another group from the Name/ group (by
(:include:) or a page text variable, or a sidebar) may link to different
pages.
We could add a separate array to process the string from the URL (in
ResolvePageName) different from $PagePathFmt that processes links in
pages, but I'm afraid then you may have unexpected results with
[[Name/]] and [[Name.]] links.
Alternatively, use Name.Name as the group homepages, and remove the
pages Name.HomePage and Main.Name.
Petko
_______________________________________________
pmwiki-devel mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel