[opencms-dev] Complete Navigation Tree

Marc Davenport mdavenport at endeca.com
Mon Nov 8 15:14:38 CET 2004


Stefano,

Thanks for the tip!  I was not looking forward to recursive searching of the
page.   The getSitenavigation method is not in the javadoc.   Is there some
other documentation for the API that I don't know about?


Marc 



-----Original Message-----
From: Stefano Suzzi [mailto:s.suzzi at protesa.it]
Sent: Monday, November 08, 2004 6:34 AM
To: 'The OpenCms mailing list'
Subject: R: [opencms-dev] Complete Navigation Tree


Hi, 
you can use this static api CmsJspNavBuilder.getSiteNavigation
that gives you the tree starting from your dir(name must end with "/") check
api doc for parameters.
Stefano.


List list = CmsJspNavBuilder.getSiteNavigation(cmsObj, "/yourDir/", -1);
Iterator i = list.iterator();

while (i.hasNext()) {
   CmsJspNavElement ne = (CmsJspNavElement)i.next();

   // some nav element methods to use.
   ne.getParentFolderName()
   ne.isFolderLink()
   ne.getResourceName());
   ne.getNavText()
   ne.getFileName()
   ne.getTitle()

}


This email message and any attachments are confidential to Endeca. If you
are not the intended recipient, please notify Endeca immediately -- by
replying to this message or by sending an email to: legal at endeca.com -- and
destroy all copies of this message and any attachments. Thank you.



More information about the opencms-dev mailing list