+

Search Tips   |   Advanced Search

banner_crumbtrail.jspf

 

<%-- Licensed Materials - Property of IBM, 5724-E76, (C) Copyright IBM Corp. 2001, 2004, 2006 - All Rights reserved.

	NOTE: See notes in Default.jsp for information regarding editing theme JSP fragments.	

--%>
<div class="wptheme-breadcrumbNav" id="breadcrumbtrail" >
<c-rt:if test="${!renderPlaceholdersOnly}">
<%@ page import="com.ibm.portal.model.NavigationSelectionModelProvider" %>
<%@ page import="com.ibm.portal.navigation.NavigationSelectionModel" %>
<%@ page import="com.ibm.portal.navigation.NavigationNode" %>
<%@ page import="com.ibm.portal.content.ContentNodeType" %>
<%@ page import="java.util.Iterator" %>

<% 
if (navigationSelectionModelHome != null) {
  NavigationSelectionModelProvider provider = navigationSelectionModelHome.getNavigationSelectionModelProvider();
  NavigationSelectionModel model = provider.getNavigationSelectionModel(request, response);
  java.util.Iterator iterator = model.iterator();
  int startLevel = themePolicy.getBreadCrumbStartLevel();
  // we limit the number of levels to render to better fit on the page
  int maxItems = themePolicy.getBreadCrumbMaxLevels();
  int currLevel = 0;
  int numItems = 0;
  while (iterator.hasNext() && numItems < maxItems)
  {
    NavigationNode node = (NavigationNode) iterator.next(); 
	ContentNodeType nodeType = node.getContentNode().getContentNodeType();
%> 
<c-rt:if test="<%=currLevel >= startLevel %>">
<c:set var="crumbtrailItemTitle"><portal-fmt:title varname="<%=node%>"/></c:set>
<c-rt:choose>
<c-rt:when test="<%= nodeType.equals(ContentNodeType.LABEL) %>">
		<% if (numItems > 0) { %><span class="wptheme-breadcrumbSeparator" <%=bidiDirAttr%>>/</span><% } %> <c:out value='${crumbtrailItemTitle}' escapeXml='true' /> <% numItems ++; %>
</c-rt:when>
<c-rt:otherwise>
   <% if (numItems > 0) { %><span class="wptheme-breadcrumbSeparator" <%=bidiDirAttr%>>/</span><% } %> <a href="<portal-navigation:navigationUrl type="link" varname="<%=node%>"/>"><c:out value='${crumbtrailItemTitle}' escapeXml='true' /></a> <% numItems ++; %>
</c-rt:otherwise>
</c-rt:choose>
</c-rt:if> 
<%  currLevel ++;
  } // end while
}
%>
</c-rt:if>
</div>