Revision 1 as of 2005-03-22 05:44:02
missing edit-log entry for this revision
converted to 1.6 markup
|No differences found!|
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.