Date: 2005-01-20T19:08:53 Editor: ScottEade Wiki: Jakarta Turbine Wiki Page: Turbine2/UsersGuide/TurbineSkins URL: http://wiki.apache.org/jakarta-turbine/Turbine2/UsersGuide/TurbineSkins
Migrated page. Content could sure do with updating though. New Page: #pragma section-numbers off 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. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]