Revision 1 as of 2005-01-21 03:08:53
Migrated page. Content could sure do with updating though.
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.