[Pmwiki-users] skins

E. Duncan Scott snark404
Sat Oct 2 13:11:39 CDT 2004


Did you see http://www.pmwiki.org/wiki/Cookbook/SkinChange

I'm using that to switch between a couple of different skins.  It 
requires that you edit config.php to add a new skin, but could easily be 
changed to create the array of skins from a listing in the /pub/skins 
directory.

I just ignore the print action and use css to set up the printed page 
(use media='print' in the stylesheet).  For any other kind of 
presentation I've just created a new skin, so I guess you could just 
create a publish skin and reference a page to be published by 
Main/HomePage?skin=publish.  A long time ago I though it would be nice 
to have every skin define a set of templates, but the current method is 
a lot simpler and you don't really lose any functionality.

This works pretty well for me.  I was actually pretty surprised that 
this skinning functionality wasn't in the base install, but script works 
just like it should.

~Duncan

P.S.  I really like the templating system in PMWiki.  It's great stuff.



Knut Alboldt wrote:
> I played around using different skins the last time (pmwiki 1) and found 
> it somehow difficult to easily create new skin and switch the skin 
> within the config.php and page-templates.
> 
> What I suggest:
> All skins should have the same name for:
> - pagetemplate (e.g. display.tmpl)
> - printpagetemplate (e.g. print.tmpl)
> - publishedpagetemplate (e.g. publish.tmpl)
> with corresponding css-files (e.g. display.css, print.css etc)
> This would have two effords:
> 1) in the config.php you could define a Skin-Var (e.g. $WikiSkin) 
> containing the skin-name = name of a dir in /pub/skins
> 2) in all page-template-files you can use the same css-references names 
> so creating a new skin from the old one would be quite easily
> 
> example:
> Now, if I want to create a new skin based on /pub/skins/pmwiki I've to 
> copy the dir "pmwiki" to a new dir "newskin". That would only change the 
> page-template. Then I've to configure $PageTemplateFmt and the 
> references to the css-files im pmwiki.tmpl
> If I want to have a corresponding print or publish-template I've to copy 
> from /pub/skins/print /pritn.tmpl e.g in /pub/skins/newskin/print.tmpl 
> and again customize some vars.
> 
> With the new proposal it would be only a copy of an existing skin-dir 
> into a new skin dir with changing a pmwiki-var $WikiSkin, that's all.
> /pub/skins/print/ would be obsolete, the contents would be moved to 
> /pub/skins/pmwiki
> 
> For more convinience a few more variables should be set according to 
> $WikiSkin:
> e.g. $SkinURL =  $PubDirUrl/skins/$WikiSkin/ (for using in display.tmpl)
> 
> PageTemplateFmt would be set to $SkinUrl/display.tmpl.
> 
> Knut
> 



More information about the pmwiki-users mailing list