[pmwiki-users] wikilink question

Patrick R. Michaud pmichaud at pobox.com
Thu Oct 12 09:56:13 CDT 2006


On Thu, Oct 12, 2006 at 04:30:22PM +0200, noskule wrote:
> hi pm hi list
> 
> I have troubles to make correct links.   If I make a wikilink in the form 
> [[PageName]] pmwiki makes a link to pagename only if there is NO group with 
> the same name. If there is a group name  with the same name as the pagename 
> then pmwiki makes a link to the mainpage of the other group.
> 
> In my case this is a unwanted behavior cause I have groups with 
> a sidebar that links in every group to pages with the same name 
> and many times there exists links with the same names as other groups have.
> 
> Is there a way to configure that? 

Yes, simply set:

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

This will cause all non-group-qualified link references to 
only refer to pages in the current group, and not look for any
groups of the same name.

> EXAMPLE: 
> Groups: Group1, Group2, Group3, ........
> 
> Sidebar (same page in all groups): 
> * Topic1
> * Topic2
> * Topic3

Note that at some point in the future this might not work
as written anyway, since links will become relative to the
page in which they are written.  In that case you'll want to
write the links as:

    * [[{*$Group}/Topic1]]
    * [[{*$Group}/Topic2]]
    * [[{*$Group}/Topic3]]

so that they always refer to "Topic1", "Topic2", "Topic3" in the
currently displayed group.

Pm




More information about the pmwiki-users mailing list