[pmwiki-users] Skin setting in local/Group.PageName.php

Patrick R. Michaud pmichaud at pobox.com
Wed Jan 24 09:57:11 CST 2007


On Wed, Jan 24, 2007 at 04:36:37PM +0100, kirpi at kirpi.it wrote:
> After setting a local/Group.php with
>     <?php $Skin = 'skinalfa';
>
> I also created a local/Group.PageName.php file with
>     <?php $Skin = 'skinbeta';

PmWiki loads per-page customizations before 
per-group customizations.  So, in this case the group
customization is the last to set the value of $Skin, and
that's the skin that is being loaded.

There are several ways to fix this -- one of the easiest
is to simply tell the per-page customization to load the
per-group customization first, and then set the value for $Skin.

In other words, change local/Group.PageName.php to read:

    <?php
      include_once('local/Group.php');
      $Skin = 'skinbeta';

Another solution is to have the Group.php file set a value
of $Skin only if it wasn't already set by the per-page
customization:

    <?php
      SDV($Skin, 'skinalfa');

Pm




More information about the pmwiki-users mailing list