WebSphere Portal, Express Beta Version 6.1
Operating systems: i5/OS, Linux,Windows


 

Theme extension points

By using the Eclipse Extension Point Framework, the default Portal theme provides various points where theme functionality can be extended by simply putting a new JAR file in the classpath.

 

Including an extension point in a theme

The tags in the <portal-theme-ext> TLD are provided for processing theme extension points. The following code provides a simple example of an extension point included in a theme:
<%-- Declares extension point ID that you want to retrieve attached extensions for --%>
	<portal-theme-ext:themeExtension id="com.ibm.portal.theme.plugin.SimpleLinks" >		
		<%-- loop over active extensions, if any --%>
		<portal-theme-ext:themeExtensionLoop>
		<%-- Use extension properties to add content to the page --%>	
		<a href="<portal-theme-ext:themeExtensionItemUrl />" >
		<portal-fmt:title varname=
     '<%=(com.ibm.portal.theme.plugin.ThemeItem)themeExtension%>' /></a>
	</portal-theme-ext:themeExtensionLoop>				
</portal-theme-ext:themeExtension>

Refer to the descriptions in Tags used by the portal JSPs for more information about the theme extension tags and the their usage options. Refer to the Javadoc information for the Themes public API as the <portal-theme-ext> tags will only work with those interfaces.

 

Using existing extension points in the included Portal theme

The included Portal theme provides extension points that allow limited customization without editing the theme JSPs. Use the following guidelines to do this:

  1. Implement the desired interface, for example, com.ibm.portal.theme.plugin.ThemeLinkItem.
  2. Create a plugin.xml file declaring the extension.
  3. Create the necessary JAR file.
  4. Put the JAR file in <WPS_HOME>/shared/app.
  5. Restart the server and your extension should now be visible in the theme.
For more information on plugin.xml files or the extension framework, refer to the Eclipse Extension Point Framework documentation. The Javadoc information for the Theme public API also contains coding and plugin.xml samples. Parent topic: Layout of the portal page
Library | Support | Terms of use |