The getNavigation() method

This method returns an initialized CmsJspNavBuilder() instance. Please refer to the provided JavaDoc for a complete description of the org.opencms.jsp.CmsJspNavBuilder class.

With the methods provided by this class you can easily build your own navigations in JSP. The description of all options of the CmsJspNavBuilder() methods is outside the scope of this documentation.


This method has no parameters!


Example usage:


Build a navigation for the current folder:

<%@ page import="java.util.*" %><%   

// Create a JSP action element
org.opencms.jsp.CmsJspActionElement cms = 
new org.opencms.jsp.CmsJspActionElement(pageContext, request, response);

// Get a simple navigation of all pages / subfolders in the current folder
List list = cms.getNavigation().getNavigationForFolder();
Iterator i = list.iterator();

out.println("<h3>A simple sample navigation</h3>");
out.println("<p>Cache properties: <b>" +"cache","this") + "</b></p><ul>");
while (i.hasNext()) {
    org.opencms.jsp.CmsJspNavElement ne = (org.opencms.jsp.CmsJspNavElement);
    out.println("<li><a href=\"" + + "\">");
    out.println(ne.getTitle() + "</a></li>");