...
- Create a UI/mvc folder in and put the custom index file (for example custom_dashboard.stg) here.
- Create a webresources/mvc folder in and put the JavaScript and CSS files here (optionally in /js and /css subfolders).
- Add a configuration section for your custom theme to aquima.properties in root, as described in the Configuration section below.
.NET
...
- Create a UI/mvc folder in the Configuration folder in the .NET webapp installation and put the custom index file (for example custom_dashboard.stg) here.
- Create a webresources/mvc folder in the Configuration folder and put the JavaScript and CSS files here (optionally in /js and /css subfolders).
- Add a configuration section for your custom theme to Web.config in the wwwroot folder, as described in the Configuration section below.
Configuration
In order to configure your theme so it will be known by the Runtime several properties must be set. The following example shows properties for registering a theme named "custom_dashboard" in both Java and .NET:
Java
Code Block |
---|
language | text |
---|
title | Properties for registering a custom theme in Java |
---|
|
mvc.themes=custom_dashboard
mvc.custom_dashboard.templateGroupFile=UI/mvc/custom_dashboard.stg
mvc.custom_dashboard.templateName=main |
Info |
---|
Working with multiple themes is possible by adding comma separated theme names to the mvc.themes property. |
.NET
Code Block |
---|
language | text |
---|
title | Properties for registering a custom theme in .NET |
---|
|
<ui>
<mvc developmentMode="false">
<themes>
<theme name="custom_dashboard" templateGroupFile="UI/mvc/custom_dashboard.stg" templateName="main"/>
</themes>
</mvc>
</ui> |
The mvc.themes or name property specifies the name for the theme which will be displayed in the Runtime theme selector. The other two properties specify which StringTemplate index file should be used and which StringTemplate function should be called to render the index page (see "Creating the index file" above). The path to the index file is relative to either the JAR/DLL or the
/Configuration folder. When a filename is specified which is located in /Configuration and that is already loaded from a JAR, the file from /Configuration will be used and the file from the JAR will be overridden. More information about overriding existing themes can be found on Extending themes.