English Design handbook

What is a skin?

To modify the design of your YACS web site, you will need to know a bit more about the files included with the archive. Here is your guided tour, along with a few hints.

A skin is a set of files used by YACS to generate the text that is sent to the end-user.

Any skin should provide a complete set of files with at least: - skin.php - the library of functions used to build items (titles, blocks, etc.) - template.php - the main template used for the final rendering - myskin.css - the cascading style sheet (CSS) that styles the various elements to be rendered - manifest.php - the skin descriptor, if any.

All images, style sheets, and other HTML components related to myskin should be located into a sub-directory of the skins directory, e.g., put everything into skins/myskin. To get a better idea, have a look at the directory called skins in the YACS file structure.

For the skin named myskin, you should have skin.php, template.php and myskin.css in the skins/myskin directory.

skin.php will implement the Skin class, that provides a library of common functions and declarations.

template.php will produce the actual HTML sent to the browser. Change this file to adapt the general layout of pages.

myskin.css will specify the style (like size, color, or images) to be applied to your titles, paragraphs, links, etc.

Armed with this knowledge, you can either create your own skin from scratch or, which is a lot easier, use the built-in capacity provided by YACS to derive skins and build on an existing skin. See How to derive a new skin for more details on this feature.

[flag]Notice :[/flag] When referring to skin.php and template.php above, we were specifically referring to the files [i]inside [/i]your myskindirectory. There are also similarly named files at the root of skins directory but you shoud not touch those. Any modification you make to them would be lost at the next update. Having your own versions of skin.php and template.php in the directory of your own skin allows you to fine-tune YACS behavior according to your needs, without messing with the built-in scripts.