How to modify Portal 8 theme to open a new window for external url.

Technote (troubleshooting)


Problem

How to open a new window for external url when using Portal 8 theme in Websphere Portal 8x envirnoment.

Resolving the problem

One could add the following bold and italics lines in the navigation.jsp in the out of the box (OOB) or custom theme based of Portal 8 theme:
<li class="wpthemeNavListItem wpthemeLeft<c:if test="${wp.selectionModel
[node] != null}"> wpthemeSelected</c:if>" >
<c:set var="externalURL" value="EXTERNALURL" />

<a href="?uri=nm:oid:${nodeID}" <c:if test="$
{node.contentNode.contentNodeType == externalURL}">target="_blank"</c:if>

class="wpthemeLeft<c:if>
....
</a>

This will check to see if the contentNode is an external URL and open it in a new window if needed.

Either update your custom theme by redeploying it and restarting the custom theme or have jsp reloading enabled and touch the Default.jsp.

Also clear the browser cache before testing.

Note: Changes to the out of the box default themes and skins may be overwritten when applying a service pack, as discussed in the technote "Default themes and skins will be overwritten by fix pack or refresh pack installation" (#1253424).



Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere Portal
General

Software version:

8.0, 8.0.0.0, 8.0.0.1

Operating system(s):

AIX, IBM i, Linux, Solaris, Windows, z/OS

Software edition:

Enable, Express, Extend, Server

Reference #:

1648451

Modified date:

2013-09-13

Translate my page

Machine Translation

Content navigation