[pmwiki-users] Farm $PageTemplateFmt and $skin
Patrick R. Michaud
pmichaud at pobox.com
Wed Mar 21 21:14:49 CDT 2007
On Tue, Mar 20, 2007 at 11:13:45PM +0100, Clemens Gruber wrote:
> for a farm setup I use $PageTemplateFmt to specify the template. This is
> necessary because the temlate is not on the sames server as the farm is,
> the temlate is generated form an other CMS system. So I can not use
> $skin to declare the template.
> ...
> What can I do? Can I use $skin with a skin on another server?
Actually, $Skin *can* declare a template, and you can even get it
to declare a template on another server.
Each skin ( in $FarmD/pub/skins/ ) is allowed to have a skin.php
file, and the skin.php file can load the template. If a skin.php
file loads a template, then PmWiki doesn't attempt to load one.
So, in the farm create a directory called pub/skins/cms/ , and in
that directory create a file called pub/skins/cms/skin.php that
contains
<?php
LoadPageTemplate('http://example.com/the-pmwiki-template.tmpl');
Then, to select this skin, simply set $Skin = 'cms'; in your
farmconfig.php file, and the skin.php file will load the template
from the other server. Since $PageTemplateFmt isn't set, other
local customizations can override the $Skin setting. (And ?action=print
works as expected.)
Hope this works, and hope it helps!
Pm
More information about the pmwiki-users
mailing list