[Pmwiki-users] Re: Skins

E. Duncan Scott snark404+pmwiki
Tue Feb 24 17:34:55 CST 2004


At first I was very wary of yet another template system, but I'm actually
finding it quite nice to use.  I do however have a few suggestions.

At this point the print action isn't so much an action as an application
of a skin.  It seems like it would be better to pass a skin argument,
which would work not only for printing, but also for any other installed
themes. That or add the abiltiy for skins to have multiple templates that
vary based on the action being performed.  This would probably require
some standardization of the template names, which brings me to my other
point.  

It seems that it may be desirable to have different templates for
different actions.  So that if someone wanted their edit template to look
very different from their browse template they could do so easily.  This
would also be another way to implement the print action.  Perhaps a
structure like this would work.

pub/skins/pmwiki/default.tmpl
pub/skins/newskin/browse.tmpl
pub/skins/newskin2/default.tmpl

So someone using the default skin would get
pub/skins/pmwiki/default.tmpl, someone browsing with newskin would get
pub/skins/newskin/browse.tmpl, but if they were editing they would get
the template from the default skin pub/skins/pmwiki/default.tmpl, and
someone using newskin2 would always get 
pub/skins/newskin2/default.tmpl.  

This system would add flexiblity to the layout of templates and make it
easy to add cookbook functionality that could take advantage of their own
layout if they desired (ie cookbooks that added their own action could
include a sample action.tmpl file if necessary).  For simpler system it
doesn't add much complexity as a completly uniform site would only have
the default.tmpl file (and accompaning stylesheets which I'm ignoring
here) to edit.  With just a little bit of work changing skins on the fly,
or in group and page php file would be really easy to do by just
specifying a skin variable.

I suppose much of this could be done in a cookbook entry, but if you are
encouraging people to make skins that everyone could use then some of
these ideas, especially more standardization in the layout of the skins,
would be more useful in pmwiki itself.  

~Duncan




-- 
http://www.fastmail.fm - I mean, what is it about a decent email service?



More information about the pmwiki-users mailing list