[Pmwiki-users] including page from different group
Patrick R. Michaud
Fri May 28 09:48:03 CDT 2004
On Fri, May 21, 2004 at 06:00:50PM -0400, Bob Dively wrote:
> When a page from group A is included on a page from group B, the WikiWords
> on the included page are parsed out in the context of the parent page. In
> other words, if my page from group A has some text "this is a WikiWord" and
> that page is included on a group B page, the link will be
> Is this by design?
It's by design--the goal is simplicity as opposed to having the system
do too many mysterious things behind the scenes.
> I can see it being a problem because someone might
> include a page, not realize that the WikiWords are now pointing to
> non-existant group A files, and someone else might come along and create
> group A files which will then conflict with the group B files. I can easily
> get around it by just making the text in the group B page read "this is a
> B/WikiWord", but that's a nuance that's not immediately obvious to users,
> particularly with casual or inexperienced users.
Another approach might to make sure that the group B files are included
in the WikiWord search path--i.e., so that "WikiWord" in any page always
refers to B/WikiWord unless there's already a WikiWord page in the current
group. The code to do this would be
$WikiWordPagePathFmt = array('$Group.$1','$1.$1','B.$1');
which says for any page link that doesn't have a group qualifier, first
look in the current group; if not found there look for a group with the
same name as the page, and if not found there look in the 'B' group.
I just noticed that this feature doesn't appear to be documented anywhere
on pmwiki.org -- it certainly needs to be in the variables documentation
and should probably have a cookbook page.
More information about the pmwiki-users