[Pmwiki-users] the order of customization file processing

Patrick R. Michaud pmichaud
Thu Oct 14 18:58:14 CDT 2004


On Thu, Oct 14, 2004 at 06:15:09PM -0400, Robert P. J. Day wrote:
>   (undoubtedly the first in a series of annoying newbie questions. :-)

Newbie questions aren't annoying.  :-)

>   does this mean that if i have a per-page file, that's the end of the
> processing and the per-group file won't even be consulted?  that seems
> kind of harsh, especially if all i want to do is override a setting or
> two.

Not at all--in the per-page customization, just do an explicit include_once
of the per-group file. For example, for MyGroup.SomePage.php:

   <?php
     include_once("local/MyGroup.php");  # get group customizations
     # do SomePage's customizations
   ?>

The reverse situation (having per-group customizations load even if 
a per-page customization exists) is even more harsh to someone who
wants to suppress a per-group file from loading.  It's easy to force
something to load via include_once; it's harder to prevent an
inclusion or reverse its effects.

One alternative might be for me to introduce $EnableGroupConfig and
$EnablePageConfig variables, or have all files automatically
load until some variable is set that indicates "don't automatically load
configuration files after this one."  (Note that this could also be achieved
via a cookbook script.)

Pm



More information about the pmwiki-users mailing list