OpenWGA is an open source java based content management system using the Mozilla JavaScript engine Rhino as scripting and expression engine. OpenWGA supports JSS in version 5.4.1 or later.

The OpenWGA plugin "OpenWGA Application Framework" - which is preinstalled in every OpenWGA distribution - provides an includable WebTML module "toCSS" in medium "jss", which you can use to create CSS styles from JSS.


<tml:include designdb="@afw" ref="toCSS" o_scope="#header">


h1: {

font_size: "200%"



Note: For this include to work you need to define a design shortcut named "afw" in the configuration of your OpenWGA design. Make it type "plugin" and specify "de.innovationgate.wga-app-framework" as reference.

Using Variables in OpenWGA JSS

OpenWGA has its own integrated way to define variables for template code. These are called WebTML variables and are usable in JSS as well, for example:

<tml:include designdb="@afw" ref="toCSS" o_scope="#header">


_padding = 20;

_color = "white";


padding: _padding,

width: 200 - _padding,

color: _color


In addition the toCSS module accepts an WebTML option "vars" where you can specify variables like you would specify fields inside a JavaScript object. These variables are available as fields of object "JSS" inside your JSS code:

<tml:include designdb="@afw" ref="toCSS" o_scope="#header">

<tml:option name="vars">

padding: 20,

color: "white"


padding: JSS.padding,

width: 200 - JSS.padding,

color: JSS.color