Differences between revisions 1 and 2
Revision 1 as of 2005-01-21 03:08:53
Size: 1237
Editor: CPE-61-9-201-26
Comment: Migrated page. Content could sure do with updating though.
Revision 2 as of 2009-09-20 22:00:17
Size: 1237
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Turbine has a 'skinnable' feature. Using Velocity templates, this feature is accessed through the key word: $ui. 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 resources directory. The file: <webapp-dir>/resources/ui/skins/default/skin.props is a properties file which defines all the properties of the default skin.

Each property name is accessible through the $ui 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 $ui element:

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

How to Change the skins

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

Turbine2/UsersGuide/TurbineSkins (last edited 2009-09-20 22:00:17 by localhost)