The getNavigation() method

This method returns an initialized CmsJspNavBuilder() instance. Please refer to the provided JavaDoc for a complete description of the com.opencms.flex.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.

Parameters:

This method has no parameters!
 

Example usage:

Build a navigation for the current folder:

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

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

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

out.println("<h3>A simple sample navigation</h3>");
out.println("<p>Cache properties: <b>" + cms.property("cache","this") + "</b></p><ul>");
while (i.hasNext()) {
    com.opencms.flex.jsp.CmsJspNavElement ne = (com.opencms.flex.jsp.CmsJspNavElement)i.next();
    out.println("<li><a href=\"" + cms.link(ne.getResourceName()) + "\">");
    out.println(ne.getTitle() + "</a></li>");
}    
out.println("</ul>");
%>
]]>