Turbine has a 'skinnable' feature. Using Velocity templates, this feature is accessed through the key word: <code>$ui</code>. It's most useful for storing skinnable properties which CSS can't cover.

When you create an application through the Turbine Developer's Kit, at the root directory of the web application is a <code>resources</code> directory. The file: <code><webapp-dir>/resources/ui/skins/default/skin.props</code> is a properties file which defines all the properties of the default skin.

Each property name is accessible through the <code>$ui</code> element in your velocity templates. For example, if you have in your skin.props file:

darkColor = #000088
homeIcon = blueHome.png

you can access these properties in your velocity templates with the <code>$ui</code> element:

<font color="$ui.darkColor">This is some dark text</font>
<img src="$ui.homeIcon">

How to Change the skins

If your interested, the <code>$ui</code> element is really a <code>org.apache.turbine.services.pull.util.UIManager</code> java object. It provides a <code>setSkin(User user, String skin)</code> method, however, I'm not really sure (at this time ;) ) how to implement it, or what the best practice is.

JakartaTurbine2UsersGuide/TurbineSkins (last edited 2009-09-20 23:50:04 by localhost)