[Pmwiki-users] Skins

Patrick R. Michaud pmichaud
Sat Feb 21 15:13:57 CST 2004


On Sat, Feb 21, 2004 at 04:37:20PM -0500, Dave Noonan wrote:
> >
> >Other apps I've looked with templating/skinning systems allow a designer
> >to come up with some pretty html into which variables representing
> >application blocks/sections are placed by a programmer. Perhaps people are
> >finding PmWiki skinning confusing because a lot of it takes place within
> >config.php which is a program file and not a layout file.
> 
> 	Bob has a good point here. Maybe we could looking into using Smarty 
> (http://smarty.php.net/) or something simliar a few versions down the 
> road? I have no desire to create a lot of extra work but

I just looked at smarty, and as far as I can tell they divide their
templates into separate header, body, and footer template files, which
I personally don't like much--I prefer to have everything in one file.
But this could almost be done in PmWiki already:

   $PageLayoutFmt['wikihead'] = file_get_contents("local/skin/header.tmpl");
   $PageLayoutFmt['wikititle'] = file_get_contents("local/skin/title.tmpl");
   $PageLayoutFmt['wikifoot'] = file_get_contents("local/skin/footer.tmpl");

or maybe

   $PageHeaderFmt = file_get_contents("local/skin/header.tmpl");
   $PageTitleFmt = file_get_contents("local/skin/title.tmpl");
   $PageFooterFmt = file_get_contents("local/skin/footer.tmpl");

and I think people would still be just as confused about all the template
files and how they might attach to CSS.

If someone will show me what an example template file should look like,
I'll implement the code to make it work.  You don't have to create a layout
from scratch here--just show me what good template files would look like
to create layouts such as http://www.pmichaud.com/wiki/PmWiki/PmWiki,
or maybe http://www.pmichaud.com/wiki/Pm/AboutPm (w/o the Google Ad code
please).  Also be sure to include some way of being able to distinguish 
the header, title, sidebars, and footer in the template, so that they
can be disabled on output.

Pm



More information about the pmwiki-users mailing list