Customize theme
You can customize theme in several ways as described in the following.
Parent
Develop custom themes
Add images or other static resources
To add images or other static resources to theme, proceed as follows:
- Copy the static resources, such as images, CSS or Javascript files, into the root directory of theme in WebDAV.
- Create subdirectories as required to organize files.
- Reference these resources in theme.html file.
For ease of development you can reference these resources by using a relative URL.
Example: Example: You create a folder /images that contains a file logo.png : <img src="images/logo.png"/>For improved runtime performance in production, use server relative or absolute URLs, such as the following:<img src="/wps/mycontenthandler/dav/themelist/mytheme/images/logo.png"/> <img src="http://myhostname:myport#/wps/mycontenthandler/dav/themelist/mytheme/images/logo.png"/>s
Referencing resources common to multiple themes and skins
You can use some resources in multiple themes, such as JavaScript libraries and common CSS style sheets. You can store these resources in the WebDAV folder /wps/mycontenthandler/dav/fs-type1/common-resources/ .You can reference these resources as if they were relative to theme folder. If the resource is not found in theme folder, the portal uses the folder /common-resources/ as a fallback location. This also allows a theme to override a file from the folder /common-resources/ by providing its own file of the same path.
Add iWidgets to the theme
You can add iWidget definitions directly to the file theme.html. They are parsed and initialized automatically when the portal loads the page.
Add a JSP to static theme.html
You cannot add a JSP file to WebDAV, as it needs a servlet context in order to compile and execute. However, you can call a JSP and have its response included in file theme.html at runtime. To do this, use the following syntax:<a rel="dynamic-content" href="res:/ [''context root of theme WAR'']/themes/html/ [''theme folder name'']/tabNav.jsp"></a>This works by using a dynamic content spot. The theme parser recognizes the snippet rel="dynamic-content" and resolves the value of the href attribute through the resource addressability framework. This invokes the JSP and streams its output into the corresponding position in the file theme.html at runtime. To use this mechanism, you also need to deploy JSP in a WAR into WAS.