[opencms-dev] navigation of a folder and it's subfolders
John Crickett
john at crickett.co.uk
Thu Jun 9 15:13:03 CEST 2005
Further to my earlier question I've read this:
http://mail.opencms.org/pipermail/opencms-dev/2005q2/016267.html
And have been trying: getNavigationTreeForFolder
But I'm not sure what the correct parameter values are I've tried:
<%@ page import="java.util.*" %>
<%@ page import="org.opencms.jsp.*" %>
<%
CmsJspActionElement cms = new CmsJspActionElement(pageContext,
request, response);
CmsJspNavBuilder builder = cms.getNavigation();
List list = builder.getNavigationTreeForFolder("/mysite/", 0,
3);
java.util.Iterator i = list.iterator();
while (i.hasNext())
{
CmsJspNavElement ne = (CmsJspNavElement)i.next();
out.println(ne.getNavText());
}
%>
Which still gets the html in the root of my folder, but also the html in
the root of the other folders (i.e. Release Notes, Alkacon
Documentation) etc.
Looking at the documentation it says:
static java.util.ArrayList getNavigationForFolder(CmsObject cms,
java.lang.String folder, int level)
Build a navigation for the folder that is either minus levels up from
the given folder, or that is plus levels down from the root folder
towards the given folder.
So it seems ideal but I'm obvious misunderstanding or not using it right
- suggestion appreciated.
Regards, John
More information about the opencms-dev
mailing list