[Pmwiki-users] skins

Knut Alboldt mailing
Sun Oct 24 09:30:14 CDT 2004


At 08:57 23.10.2004, you wrote:
>On Tue, Sep 21, 2004 at 11:34:01AM +0200, Knut Alboldt wrote:
> >
> > But what do you think about the "naming"-standard of using one
> > template-name, e.g. /pub/skinname/display.tmpl for page display instead of
> > /pub/skinname/skinname.tmpl as well as for the referenced css-files. 
> Then a
> > copy of an existing skin could be customized with less work.
>
>Actually, after thinking about this a bit more (and helping a couple of
>other users troubleshoot layouts) I've decided to try out a naming
>standard for skins in the pub/skins/ directory.

Glad to read this !

>The new standard I'm
>looking at adopting for 2.0:
>
>   - Each skin has its own directory in pub/skins/ (e.g., the "pmwiki" skin
>     is in pub/skins/pmwiki/, while the "print" skin is in pub/skins/print/).
>
>   - Within a skin directory, the template for screen displays goes in
>     screen.tmpl, while the template for ?action=print goes in print.tmpl.
>
>   - An administrator can easily select a skin by setting $PageSkinFmt
>     (or $PrintSkinFmt) to the name of the directory holding the skin.
>     For example, setting $PageSkinFmt="myskin" would cause PmWiki to
>     use pub/skins/myskin/screen.tmpl as the display template.
>
>   - PmWiki automatically sets $SkinDirUrl to be the URL for reaching
>     the skin's directory (e.g., to access graphic or .css files).
>
>   - $PageTemplateFmt and $PrintTemplateFmt work as in previous versions--
>     if set then they explicitly name the file to be used as the template
>     rather than have it automatically determined from $PageSkinFmt
>     or $PrintSkinFmt (i.e., to select a template other than
>     screen.tmpl/print.tmpl).
>
>Hopefully this will make things a lot simpler for building and
>distributing skins:
>
>   - css files within a layout template can now be specified relative
>     to the skin's directory

as well as images, which will be used with the skin (group/page-independent)

>   - a skin can optionally provide both a screen and a print layout
>     (PmWiki then uses its default skins for any layout not provided)
>
>   - distributing skins as cookbook scripts is greatly simplified
>     and standardized
>
>   - selecting a skin is much easier, as the administrator merely names
>     the skin to be used rather than having to specify a complete
>     on-disk path name to the template file (many new administrators
>     assume a URL is needed).
>
>The new skin directory structure appears in 2.0.devel16 (just about to be
>released).
>
>Pm

Thanks a lot, that makes "skin-life" easier. Now I can remove all of my 
skin-concerning customisations of pmwiki (except the skin itself :-)

Knut 




More information about the pmwiki-users mailing list