Theme extension points

 

+

Search Tips   |   Advanced Search

 

By using the Eclipse Extension Point Framework, the default IBM theme provides various points where theme functionality can be extended by simply putting a new JAR file in the classpath. The following sections provide additional information on theme extension points and how to use them:

 

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

 

Use existing extension points in the included IBM theme

The included IBM 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 the 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.

Additional information can be found in the Application extension registry topic. From that topic there are related topic links to more Application extension registry information in the IBM WAS documentation as well as to information on Eclipse plug-in architecture.

 

Related information