moreMenu.jsp
<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <%-- Licensed Materials - Property of IBM, 5724-E76, (C) Copyright IBM Corp. 2001, 2004, 2006 - All Rights reserved. --%> <%@ page session="false"%> <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-fmt" prefix="portal-fmt" %> <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-navigation" prefix="portal-navigation" %> <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-logic" prefix="portal-logic" %> <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-core" prefix="portal-core" %> <%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-theme-ext" prefix="portal-theme-ext" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt" %> <%@ taglib uri="/WEB-INF/tld/portal-internal.tld" prefix="portal-internal" %> <jsp:useBean id="themePolicy" class="com.ibm.portal.theme.policy.ThemePolicyBean" scope="page"/><portal-core:constants/><portal-core:defineObjects/><portal-theme-ext:initthemepolicy/><% themePolicy.setValuesMap(portalThemePolicyMap); int menuItemCount=0;%> <jsp:useBean id="pageIconUrl" class="java.lang.Object" scope="page"/><jsp:useBean id="defaultPageIconUrl" class="java.lang.String" scope="page"/><c:set var="defaultPageIconUrl" ><portal-logic:urlFindInTheme file='clearPixel.gif' /></c:set><html><body><script type="text/javascript">function getMenuContents(){ return [ <portal-logic:if portletSolo="no" navigationAvailable="yes"><portal-navigation:navigation startLevel="${themePolicy.rootNavigationStartLevel}" stopLevel="${themePolicy.rootNavigationStopLevel}"><% int topLevelLinksCount=0; final int numOfLinksToShowInBanner=4; %> <portal-navigation:navigationLoop><%--need to add node variable to pagemetadatatag to use inside navigation loop--%> <% boolean isNodeVisible=true; if (wpsNavNode instanceof com.ibm.portal.MetaDataProvider) { com.ibm.portal.MetaData iMetaData=((com.ibm.portal.MetaDataProvider) wpsNavNode).getMetaData(); Object hiddenValue=iMetaData.getValue("com.ibm.portal.Hidden"); if(hiddenValue != null){ if(hiddenValue.toString().equalsIgnoreCase("true")){ isNodeVisible=false; }else{ isNodeVisible=true; } }else{ isNodeVisible=true; } Object pageIcon=iMetaData.getValue("com.ibm.portal.PageIcon"); if(pageIcon != null && !pageIcon.toString().equals("")){%> <c:set var="pageIconUrl" ><portal-logic:urlFindInTheme file='<%=pageIcon.toString()%>' /></c:set><%}else{%> <c:set var="pageIconUrl" ></c:set><%} } if (isNodeVisible){ if (topLevelLinksCount >= numOfLinksToShowInBanner) { Object icon=(Object) pageContext.findAttribute("pageIconUrl"); if (icon.equals("") || icon.equals(null)) { icon=(String) pageContext.findAttribute("defaultPageIconUrl"); } %> <c:set var="menuTitle" ><portal-fmt:title /></c:set><% if (menuItemCount > 0) { %>,<% } %>"asynchDoFormSubmit('<portal-navigation:navigationUrl screenTemplate='' type='link' themeTemplate='' />');","<c-rt:out value='${menuTitle}' escapeXml='true' />","<%= icon %>" <% menuItemCount++; } topLevelLinksCount++; } %> </portal-navigation:navigationLoop></portal-navigation:navigation></portal-logic:if>]; } </script></body></html>