[opencms-dev] SiteMap / Navigation

Marius Oancea mar1u50 at yahoo.ca
Thu Jun 9 14:36:05 CEST 2005


Hi,
    I'm not and expert in OpenCms yet but i think the api only returns 
the current navigation level. You have to recursivelly browse the tree. 
Create a java class for that propose, or (i do not recomand) make a 
metod in jsp.

Regards
    Marius

John Crickett wrote:

>I'm trying to build a sitemap / navigation system for my site I've had a
>look at the documentation and the following messages in the archive:
>
>http://mail.opencms.org/pipermail/opencms-dev/2005q2/017277.html
>
>However like this chap:
>
>http://mail.opencms.org/pipermail/opencms-dev/2005q1/014744.html
>
>My list returned from getSiteNavigation is incomplete. My code is:
>
><%@ page import="java.util.*" %>
><%@ page import="org.opencms.jsp.*" %>
><%	
>	CmsJspActionElement cms = new CmsJspActionElement(pageContext,
>request, response);
>
>	CmsJspNavBuilder builder = cms.getNavigation();
>
>	List list = builder.getSiteNavigation("/mysite/", -1);
>
>	java.util.Iterator i = list.iterator();
>
>	while (i.hasNext()) 
>	{
>		CmsJspNavElement ne = (CmsJspNavElement)i.next();
>
>		out.println(ne.getNavText());
>	}
>%>
>
>Which results in the print out of the 3 html files in the dir
>/sites/default/mysite/ but nothing from the subdirectories any pointers
>as to what I'm doing wrong would be much appreciated.
>
>Regards, John
>
>
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>  
>


-- 
Let your workings remain a mystery.
Just show people the results,
	Lao-Tsu,Tao Te Ching


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the opencms-dev mailing list