Portal Express, Version 6.0
Operating systems: i5/OS, Linux, Windows
Portal style classes
The CSS style sheets that are used for the portal page are dynamically generated by JSPs located in...
/themes/IBM/You can change the tag definitions and the class definitions in the CSS style sheets. Do not delete any style sheets or remove any style classes.
Dynamically generated style sheets require far fewer files to support variations based on locale, browser, and color palette.
CSS File structure:
styles.jsp Root page which includes children styles_cacheSettings.jspf Headers to control how the output CSS is cached styles_rules.jspf Logic to be consumed by style definitions styles_theme.jspf Style definitions for the theme styles_portlet.jspf.html Standard styles for portlets styles_ibm.jspf Styles for IBM portlets styles_help.jspf Styles for portlet help files styles_oob.jspf Styles for out of box Information portlet JSPs
Modifying dynamic styles
All logic controlling the generation of dynamic styles is contained in styles_rules.jspf. This JSP fragment creates a map of rules for use by the style definitions. Refer to this file for the rules available for use in your style definitions, as well as to modify the logic as desired for your installation.
If you want to add a additional styles, create your own JSP fragment, such as styles_myStyles.jspf, and modify styles.jsp to include it as well. In this way, your styles are incorporated into the portal stylesheet and are able to use the dynamic rules.
Caching dynamic styles
Dynamic styles vary their output by browser, locale, and color palette.
The <portal-theme:cacheProxyUrl> tag generates a cacheable url to styles.jsp that encodes the browser, locale and color palette variables. This allows the output CSS to be cached by the server for improved performance.
Style classes for portlets
The style sheets that are used by IBM® WebSphere® Portal Express contain classes that can be used by portlets to ensure visual consistency among portlets on the page. Using these classes ensures that no matter what theme has been selected, the portlet look and feel matches that of other portlets and the portal page.
To determine which classes to invoke in your portlet output, portlet developers can examine the styles_portlets.jspf file that is located in the IBM WebSphere Application Server directory:
- Windows:
was_profile_root\installedApps\cellname\wps.ear\wps.war\themes\html\IBM\
- Linux:
was_profile_root/installedApps/cellname/wps.ear/wps.war/themes/html/IBM/
- i5/OS:
app_server_root/installedApps/cellname/wps.ear/wps.war/themes/html/IBM/css
The file includes comments explaining the use of each class.
Portlet helps use the style classes in styles_help.jspf . For most tags, using class="help" ensures that the portlet help renders consistently with helps for other portlets on the page.
Parent topic:
Customizing the portal