Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6895897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:58:02+00:00 2026-05-27T06:58:02+00:00

Page Title Is there a way to dinamically change the pages title at runtime?

  • 0

Page Title

Is there a way to dinamically change the pages title at runtime?

I know that you can change the page title at the portal level, but this solution
doesn’t offer any SEO value since it doesn’t change the TITLE tag in the page.

For what I’ve seen the way to changing the portal titles are very static (these are global settings):

  • Changing the bannerTitleText in the theme policy
  • If that’s not present adjust the bannerTitleTextResourceBundle and bannerTitleTextResourceKey to the desired value.
  • Otherwise, set the titles globally at the theme configuration

Our goal is to be able to set the title at the page level so that it can change from page to page and include the relevant page’s keyword.

Actually it would be most ideal if this could be done from WCM.

Update

I noticed that the default theme in WebSphere Portal 6.1.5 was appending the page title, so examined the theme and surely enough the jspInit.jspf had some the following new methods:



private static com.ibm.portal.state.service.PortalStateManagerServiceHome portalStateManagerServiceHome;

// (This goes in the jspInit constructor)
portalStateManagerServiceHome = (com.ibm.portal.state.service.PortalStateManagerServiceHome) ctx.lookup("portal:service/state/PortalStateManager");

protected com.ibm.portal.state.service.PortalStateManagerService getStateManagerService( javax.servlet.ServletRequest request, javax.servlet.ServletResponse response ) throws Exception {
    final com.ibm.portal.state.service.PortalStateManagerService psms = portalStateManagerServiceHome.getPortalStateManagerService( (javax.servlet.http.HttpServletRequest) request, (javax.servlet.http.HttpServletResponse) response );
    return psms;
}
protected boolean isStaticPage( javax.servlet.ServletRequest request, javax.servlet.ServletResponse response ) throws com.ibm.portal.ModelException {
    final com.ibm.portal.model.NavigationSelectionModelProvider nsmProvider = navigationSelectionModelHome.getNavigationSelectionModelProvider();
    final com.ibm.portal.navigation.NavigationSelectionModel nsm = nsmProvider.getNavigationSelectionModel(request, response);
    final com.ibm.portal.navigation.NavigationNode currentNavNode = (com.ibm.portal.navigation.NavigationNode) nsm.getSelectedNode();
    final com.ibm.portal.content.ContentNode currentContentNode = currentNavNode.getContentNode();

    return currentContentNode.getContentNodeType().equals( com.ibm.portal.content.ContentNodeType.STATICPAGE );
}

protected com.ibm.portal.navigation.NavigationNode getSelectedNode( final javax.servlet.ServletRequest request, javax.servlet.ServletResponse response ) throws com.ibm.portal.ModelException {
    com.ibm.portal.model.NavigationSelectionModelProvider nsmProvider = navigationSelectionModelHome.getNavigationSelectionModelProvider();
    com.ibm.portal.navigation.NavigationSelectionModel nsm = nsmProvider.getNavigationSelectionModel(request, response);
    return (com.ibm.portal.navigation.NavigationNode) nsm.getSelectedNode();
}

protected String getSelectedNodeTitle( final javax.servlet.ServletRequest request, javax.servlet.ServletResponse response ) throws com.ibm.portal.ModelException {
    final String title;
    if ( localizedContextHome != null ) {
        com.ibm.portal.model.LocalizedContext context = localizedContextHome.getLocalizedContext( (javax.servlet.http.HttpServletRequest) request );
        title = context.getTitle( getSelectedNode( request, response ) );
    } else {
        title = "";
    }

    return title;
}

After adding this I was able to copy the head_title.jspf from the 6.1.5 theme; which includes the following new lines:


<c:set var="selectedNodeTitle" value="<%=getSelectedNodeTitle(request, response)%>" />
<title><c:out value="${siteTitle} - ${selectedNodeTitle}"/></title>

Now all that’s left is figuring out a way of fetching this from WCM.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:58:03+00:00Added an answer on May 27, 2026 at 6:58 am

    I just wanted to update this question to mention that there’s a new feature that enables a better way to achieve this same goal.

    The new Web Content Viewer (286) takes advantage of a new feature in the JSR 286 called two phase rendering in which a new event is created called doHeaders. Under the doHeaders event the response can be modified in order to add elements in the head such as title.

    Now the Web Content Viewer provides a Page Display Title setting which enables you to do a Select from content.

    Now all that’s left really is to enable us developers set other elements from Web Content such as: Canonical elements/links, meta tags, etc. But I think that the new Web Content Folders feature can enable us to build something at the theme level.

    Good luck to every SEO conscious Lotus Web Content Management developers out there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to extract HTML page title using Perl? I know it
Is there a way to get page title in a layout? I would expect
In GWT , there is a way to change the tab title Window.setTitle(new Title)
Is there any way to get the title of a cms page, if you
is there a way to just search pages Custom Types Posts I am currently
I have this div in my master page. <div id=UICancelChanges title=Are you sure? style=display:
i have set a title of Browser via Application.pageTitle property. is there any way
i need to retrieve the page title from an URL i already have using
I try to add dots between the page title and the page number in
I am trying to send the UIWebView page Title to UINavigationBar. I would also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.