[Pmwiki-users] Re: Skins

Richard Canning rcanning
Tue Feb 24 17:45:55 CST 2004


I don't see why you could not do something like this.

   if ($action=='greenskin') $PageTemplateFmt = "pub/skins/green/green.tmpl";

To allow you to create a skin and then apply it to a page with an action.

Of course, I am not a coder, so I could be completely wrong.

Richard Canning

-----Original Message-----
From: E. Duncan Scott [mailto:snark404+pmwiki at mailhaven.com] 
Sent: Wednesday, February 25, 2004 11:30 AM
To: Pmwiki Mailing List
Subject: [Pmwiki-users] Re: Skins


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?

-- 
Pmwiki-users mailing list
Pmwiki-users at pmichaud.com http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com



The information contained in this email message and any attachments
may be confidential and may also be the subject of legal professional
privilege.  If you are not the intended recipient of this email, any
disclosure or copying of this material is unauthorised and prohibited.
Please notify me by return email.




More information about the pmwiki-users mailing list