[pmwiki-users] Skins and LocalTemplates file

Patrick R. Michaud pmichaud at pobox.com
Tue May 29 13:51:34 CDT 2007


On Tue, May 29, 2007 at 02:45:07PM -0400, DaveG wrote:
> 
> >> wikilib.d, but when I try to add this to my skin.php it seems that
> >> $FPLTemplatePageFmt is either not yet declared, or is not an array [...]
> > 
> > It's not yet declared at the time that skin.php is invoked -- skins are
> > processed prior to the pagelist.php code being loaded.
> > 
> > I don't have a straightforward answer at the moment, 
>
> How about having pagelist.php check to see if $FPLTemplatePageFmt 
> is already defined, and if it is simply append to it? That way 
> skin.php can define the new pages to use, and pagelist.php simply 
> adds more.

If pagelist.php always adds more to the list, how would an admin
tell pagelist.php "I want to use exactly this set of pages" ?

> > other than to have
> > the skin.php set all of $FPLTemplatePageFmt explicitly if it's not
> > already set.  
>
> That works, but I'm concerned that it will override any settings 
> the user may have in their config.php file.

My $0.02:  If the admin has already set $FPLTemplatePageFmt, then
skin.php shouldn't be changing it.   If skin.php simply uses
SDV() to set what it thinks $FPLTemplatePageFmt should look
like, then it will end up honoring the admin's setting (if set)
or using its own (if not set).  That seems to work correctly, at
least for the limited cases we're considering here.

Pm



More information about the pmwiki-users mailing list