Brandon R. Stoner monokrome@monokro.me
This is a small application that I use which extends the default Kohana View system to support view skinning. When used in tandem with kohana-resources, it allows web sites to be fully reskinned without changing any URLs in the original site.
Skin views are placed in application/skins/skin_name. In a standard installation, the skin name is set to 'default'. However, this can - of course - be changed in the configuration. It is best practice to only provide skin-specific views within your skin directories, as the system will cascade if files don't exist.
For instance, if a user that prefers a skin called 'simple' was to visit a controller that loads the index view - the view will be searched for with the following paths:
- application/skins/simple/index.php
- application/skins/default/index.php
- application/views/index.php
You can create some fairly elaborate relationships with this pattern. Allowing you to, in example, create a navigation.php view in views/ that all skins can make use of. When changing this navigation.php file, you will then be modifying all skins instead of having to modify each one separately.