Customize the portlet title
With the appropriate configuration settings, we can customize the portlet window title to be the same as the default portlet title, the title of the first selected feed, or a custom title specified in the portlet configuration panel.
The IBM Syndicated Feed portlet provides dynamic window title support that implements the request attribute, com.ibm.portal.portlet.Constants.DYNAMIC_TITLE. HCL WebSphere Portal defines the title bar for portlets in control.jsp. To add dynamic title support for the IBM Syndicated Feed portlet, deploy the dynamic window title support and update control.jsp.
Because the PORTAL_HOME directory is read only, we cannot modify the window title support libraries, control.jsp, or other theme files in this directory. We should include these files as part of a custom theme or deploy the files as a separate Web Archive (WAR). See the following topics for more information: Location of theme resources and Create a new theme.
- Deploy the dynamic window title support with the custom Web Archive (WAR).
- Navigate to the following directory: PORTAL_HOME/bp/wp.bp.feedspace/installableApps
If we downloaded the IBM Syndicated Feed portlet from the IBM Business Solutions Catalog, the required files are available in the root directory of the archive.
- Locate and copy the following files to a work directory:
- dynamicWindowTitle.jar
- dynamicWindowTitle.tld
- Copy dynamicWindowTitle.jar to the following directory in the custom WAR: WEB-INF/lib
- Copy the file dynamicWindowTitle.tld to the following directory in the custom WAR: WEB-INF/tld
- Customize the skin(s) to use with the IBM Syndicated Feed portlet. Perform the following steps for each skin you plan to use:
- Locate control.jsp in the skin directory of the WAR file.
- Locate the last taglib definition in the file. For example,
<%@ taglib uri="/WEB-INF/tld/dnd.tld" prefix="dnd" %>
- Insert the following string after that tag:
<%@ taglib uri="/WEB-INF/tld/dynamicWindowTitle.tld" prefix="dwt" %>
- Locate the following string:
<portal-skin:portletTitle>
If the file does not contain this string, insert it after the last taglib definition.
- Insert the following string before this tag:
<dwt:renderTitle windowId="<%=myPortletID%>">
- Locate </portal-skin:portletTitle>.
- Insert the following string after this tag:
</dwt:renderTitle>
- Add the following tag to the end:
<dwt:setTitle windowId="<%=myPortletID%>"/>
- Save and close Control.jsp. The changes made to Control.jsp should be similar to the following:
<%@ taglib uri="/WEB-INF/tld/dnd.tld" prefix="dnd" %> <%@ taglib uri="/WEB-INF/tld/dynamicWindowTitle.tld" prefix="dwt" %> :::::::::::: :::::::::::: <dwt:renderTitle windowId="<%=myPortletID%>"> <portal-skin:portletTitle> <portal-fmt:problem bundle="nls.problem"/> </portal-skin:portletTitle> </dwt:renderTitle> <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%>" />
What to do next
We can now 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 disables the portlet window title customization options in the Personalize/Edit Shared Settings/Configure modes when the portlet detects that it is displayed in a skin that does not support the dynamic window title features. The IBM Syndicated Feed portlet also disables these options if an administrator locks the window title features.
See Tip: Changing a portlet title at run time in HCL WebSphere Portal V6.
Parent IBM Syndicated Feed Portlet for HCL WebSphere Portal
Related information
HCL WebSphere Portal Business Solutions Catalog