[Pmwiki-users] Re: PmWiki.LayoutBasics
chr@home.se
chr
Sat Nov 27 00:36:30 CST 2004
On Fri, 26 Nov 2004, Patrick R. Michaud wrote:
> In writing the documentation, the one page that probably needs a lot of
> work is the one that describes the basics of creating/customizing skins
> (http://www.pmwiki.org/wiki/PmWiki/LayoutBasics). If there are any people
> out there who could identify ways in which this could be made clearer
> I would really appreciate it.
The site is down for maintenance, so I couldn't look at LayoutBasics,
but here are some thoughts:
> The basics:
> - The skin to be used is controlled by the $Skin variable, which names
> a directory in pub/skins.
> - Inside of that directory there should be a '.tmpl' file. If there is
> only one .tmpl file, it is used, otherwise PmWiki uses the .tmpl file
> with the same name as the skin, the file 'skin.tmpl', or else it throws
> an error.
* What is a skin...?
Q: What is a skin?
A: A ''skin'' is a local customization the wiki that changes the \
appearance and/or behaviour of the wiki. This could simply be a \
matter of choosing different colours, or more advanced such as \
changing the structure of a wiki page.
On a more practical level, a skin is a '.tmpl'-file which uses \
a special format to describe the layout of a wiki page.
Is the text above correct?
* Why not call a skin-file for '.skin'??? Shouldn't we call them templates
otherwise, or am I missing something?
> The somewhat more than basics:
> - The variable $SkinDirUrl is set to the url of the skin's directory, thus
> graphic images and CSS files can be referred to as $SkinDirUrl/something.css.
> - If there's a file called '$Skin.php' or 'skin.php' in the skin directory,
> it's loaded before any template files are loaded. The .php file can also
> request a specific template file to be loaded by calling LoadPageTemplate().
I guess this actually a relativel advanced thing to do, so I recommend
putting some exampls on the page. Ideally these examples could be tested a
a wikiadmin, i.e. the examples are shipped with pmwiki (e.g. in
pub/skins/examples/example1)
I hope some of this helps:-)
/Christain
--
Christian Ridderstr?m, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list