PagePaths

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Searching WikiWords and FreeLinks pages outside the current group

By default, in PmWiki, WikiWords and FreeLinks pages are searched inside the current group, unless another group path is explicitly required (by OtherGroup/ThatPage or OtherGroup.ThatPage)

You may want that the WikiWords or FreeLinks pages be searched in multiple groups.

This is possible by redefining the searching path defined in the variable $WikiWordPagePathFmt

By default this is set as

  $WikiWordPagePathFmt =  array('$Group.$1','$1,$1');

which says to look for a page in the current group, and next in a group with the same name as the page.

You can set this variable in config.php to specify any set of groups you wish, thus

  $WikiWordPagePathFmt = array('$Group.$1', 'A.$1', 'B.$1', 'C.$1', '$1.$1');

says to look first in the current group, then in group A, then group B, then group C, and finally in a group with the same name as the page.

Example of a redefinition:

  $WikiWordPagePathFmt = array('$Group.$1','$DefaultGroup.$1',
    'YourGroup1.$1','YourGroup2.$1','PmWiki.$1','$1.$1');

pmwiki-2.3.38 -- Last modified by {{simon}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons