[Alkacon Documentation]
OpenCms Scriptlet docs
Contents
Documentation for the user() method
Test for the user() method
Documentation for the property() method
Test for the property() method
Documentation for the link() method
Test for the link() method
Documentation for the label() method
Test for the label() method
Documentation for the editable() method
Documentation for the include() method
Test for the include() method
Test for the include() method with parameters
Documentation for the template() method
Test for the template() method
JSP page with two simple template elements
Documentation for the info() method
Test for the info() method
* Documentation for the getNavigation() method
Test for the getNavigation() method
|
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.
Parameters:
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>" + cms.property("cache","this") + "</b></p><ul>");
while (i.hasNext()) {
org.opencms.jsp.CmsJspNavElement ne = (org.opencms.jsp.CmsJspNavElement)i.next();
out.println("<li><a href=\"" + cms.link(ne.getResourceName()) + "\">");
out.println(ne.getTitle() + "</a></li>");
}
out.println("</ul>");
%>
|
|