Wednesday, September 16, 2009

Nested URL opens in new browser window instead of current window

How do i do :
In IBM WebSphere Portal, when creating a new external URL using the Manage Pages administration portlet, it behaves differently depending on which the level used.

* Example 1: If you go to Content Root --> Home --> Level 2 URL (mapped to www.ibm.com) and leave Portal administration, when you click the new URL, it opens www.ibm.com in the same window.

* Example 2: If you go to Content Root --> Home --> Welcome --> Level 3 URL (mapped to www.ibm.com) and leave Portal administration, when you click the new URL, it opens a new browser window for www.ibm.com.

Cause
The behavior is working as designed.


Resolution
In Example #2, the navigation exists on the left side of the page as opposed to across the top of the page as in Example #1.
To allow the links on the left navigation to open in the same window, remove any references in the page's theme to "target+"_blank"". This reference causes the link to open in a new window.

If using the default IBM theme, do the following:

-- Stop WebSphere Portal.
-- Remove the reference in the following files: Default.jsp and sideNav.jspf
-- Remove the temporary files for the IBM theme in/temp/cellname/WebSphere_Portal/themes.
-- Start WebSphere Portal.
-- Click the link again. It should open in the same window.