[opencms-dev] how to show 2 level navigation in one page
DI Gunther Schmidl
schmidl at webdynamite.com
Tue Apr 18 09:15:14 CEST 2006
> Actually, I want to build a directory navigation in the page, to show all
> the information in one page. I can't find an API like this. Do I have to
call
> "getFolder list", and implement it by myself? Thank you for any help. Sean
Hi,
it's easiest to use getSiteNavigation:
String subsite = "/sites/whatever/";
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
Iterator iter = cms.getNavigation().getSiteNavigation(cms.getCmsObject(),
subsite, -1).iterator();
Note that:
1) the subsite cannot be "/" or you will get an empty list back for some
reason
2) the subsite MUST end with "/" or you will get an empty list back for some
reason
You can find full code for a sitemap using <ul> lists on
http://cms.galway.net:8080/OpenCmsWiki/Wiki.jsp?page=Tips
-- Gunther
More information about the opencms-dev
mailing list