R: [opencms-dev] Complete Navigation Tree

Stefano Suzzi s.suzzi at protesa.it
Mon Nov 8 12:33:48 CET 2004


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()

}

-----Messaggio originale-----
Da: Marc Davenport [mailto:mdavenport at endeca.com] 
Inviato: sabato 6 novembre 2004 0.16
A: 'opencms-dev at opencms.org'
Oggetto: [opencms-dev] Complete Navigation Tree

I'm trying to figure out how to display the entire navigation tree, not just
the path between one file and the root.

like so:
1
-----a
-----b
---------i
---------ii
-----c
---------iii
--------------x
--------------y
------d
2
-----e


my ultimate goal is to make a drop down menu of the site, which can go more
than on level down.

Has anyone already solved this problem?  


Regards,
marc davenport



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