+

Search Tips   |   Advanced Search


Enable customization of portlet title

With appropriate configuration settings, the portlet window title can be chosen to be the same as the default portlet title, the title of the first selected feed, or a custom title specified by the user in the portlet configuration.

The setTitle() method of the JSR-168 portlet API is not supported (refer to the topic Comparing the standard portlet API to the IBM portlet API). Due to this limitation, it is not possible to dynamically change the title of a portlet window at runtime. The recommended solution is to exploit the request attribute com.ibm.portal.portlet.Constants.DYNAMIC_TITLE along with some custom JavaScript (refer to Tip: Changing a portlet title at run time in WebSphere Portal V6).

The dynamic window title support provided by the IBM Syndicated Feed portlet uses this method.

This method, however, requires cooperative support between the portlet instance and the skin containing the portlet instance (the portlet window). Because of this requirement, the following, additional configuration steps are required in order to use the dynamic window title support.

  1. Deploy the Dynamic Window Title Support

    1. Locate the files named dynamicWindowTitle.jar and dynamicWindowTitle.tld. These files are available at <wp_install_root>\bp\wp.bp.feedspace\installableApps, where <wp_install_root> is the WebSphere Portal installation root (for example, C:\IBM\WebSphere\PortalServer). If you downloaded the IBM Syndicated Feed portlet from the WebSphere Portal Business Solutions Catalog, you can find these files located inside the ZIP package at the same directory level as the IBM Syndicated Feed portlet WAR.

    2. Copy the file dynamicWindowTitle.jar to the location <wp_install_root>\shared\ext, where <wp_install_root> is the WebSphere Portal installation root (for example, C:\IBM\WebSphere\PortalServer).

    3. Copy the file dynamicWindowTitle.tld to the location <wp_install_root>\shared\app\WEB-INF\tld, where <wp_install_root> is the WebSphere Portal installation root (for example, C:\IBM\WebSphere\PortalServer).

    4. Repeat steps 1-3 for every node in the cluster.

    5. Restart WebSphere Portal server.

  2. Customize the skin

    1. Determine the skin or set of skins that will be used to display the IBM Syndicated Feed portlet instances within the portal. These skins must be customized.

      Please take note of the steps for deploying customized themes and skins in the WebSphere Portal InfoCenter (refer to the Deploying customized themes and skins topic in the WebSphere Portal InfoCenter). Once you have customized your skins as below, add the deployment of these custom skins (if not already being done) to your deployment procedures.

    2. For each skin to be used...

    3. Locate the file named Control.jsp within the skin directory.

    4. Locate the last taglib definition in the file, for example,

      <%@ taglib uri="/WEB-INF/tld/dnd.tld" prefix="dnd" %>

    5. Insert the following text after the last taglib definition:

      <%@ taglib uri="/WEB-INF/tld/dynamicWindowTitle.tld" prefix="dwt" %>

    6. Validate that the file contains the following text:

      <portal-skin:portletID var="myPortletID"/>

    7. If the file does not contain the text in the previous step, add this text after the text you added in step 4.

    8. Locate the following text in the file:

      <portal-skin:portletTitle>

    9. Insert the following text before the text you located in the previous step:

      <dwt:renderTitle windowId="<%=myPortletID%>">

    10. Locate the following text in the file:

      </portal-skin:portletTitle>

    11. Insert the following text after the text you located in the previous step:

      </dwt:renderTitle>

    12. Append the following text at the end of the file:

      <dwt:setTitle windowId="<%=myPortletID%>"/>

    13. Save and close the file. A Control.jsp file will have text similar to the following code block after you make the updates for enabling the dynamic window title customization.

      <%@ taglib uri="/WEB-INF/tld/dnd.tld" prefix="dnd" %> 
      
      <%@ taglib uri="/WEB-INF/tld/dynamicWindowTitle.tld" prefix="dwt" %> 
      
      <!-- Steps 3-4 -->
      
      ::::::::::::
      ::::::::::::
      
      <dwt:renderTitle windowId="<%=myPortletID%>">
      <portal-skin:portletTitle>
      <portal-fmt:problem bundle="nls.problem"/>
      </portal-skin:portletTitle>
      </dwt:renderTitle>
      <!-- Steps 7-10 --> 
      
      <img  style="border:0; text-align: <%= bidiAlignRight %>;"  width="1" height="22"  src='<portal-logic:urlFindInSkin file="title_minheight.gif"/>'>
      </div></dnd:dragHandle></td>
      <td class="wpsPortletIcons">
      <%-- Do not include 'Skip to next portlet' link in --%> 
      <%-- standalone window or solo mode --%> 
      
      <%if(isJSAvail){%> 
      :::::::::::::::::::::::
      :::::::::::::::::::::::
      
      <dwt:setTitle windowId="<%=myPortletID%>" />
      <!-- Step 11 -->
      

    14. Restart WebSphere Portal Server.

You will now be able to use the dynamic portlet window title customization option with all IBM Syndicated Feed portlet instances inside the skins you customized.

The IBM Syndicated Feed Portlet will disable the portlet window title customization options in the Personalize/Edit Shared Settings/Configure modes when it detects that it is being displayed within a skin that does not support the dynamic window title features. It will also disable these options if the window title features have been locked by an administrator.


Parent topic:

Work with IBM Syndicated Feed Portlet for WebSphere Portal


Related concepts


Usage notes for the IBM Syndicated Feed Portlet
Client side aggregation (CSA) rendering in IBM Syndicated Feed Portlet


Related tasks


Configure proxy settings
Enable display of SSL-secured feeds
Configure cookies
Deploy the theme


Related reference


Comparing the standard portlet API to the IBM portlet API


Related information


WebSphere Portal Business Solutions Catalog
Changing a portlet title at run time in WebSphere Portal V6